Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 2809563 in mainline


Ignore:
Timestamp:
2011-12-05T17:45:11Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
7a5ab20
Parents:
eaa1c28
Message:

dplay: Use useconds_t as interval format. Fix buffer pointer used to update buffer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/dplay/dplay.c

    reaa1c28 r2809563  
    5858
    5959        /* Time to play half the buffer. */
    60         const unsigned interval = 1000000 /
     60        const suseconds_t interval = 1000000 /
    6161            (sampling_rate /  (half_buf / (channels * (sample_size / 8))));
    62         printf("Time to play half buffer: %zu us.\n", interval);
     62        printf("Time to play half buffer: %ld us.\n", interval);
    6363        /* Initialize buffer. */
    6464        const size_t bytes = fread(buffer, sizeof(uint8_t), size, source);
     
    8585                        usleep(delay);
    8686                const size_t bytes =
    87                     fread(buffer, sizeof(uint8_t), half_buf, source);
     87                    fread(buffer_place, sizeof(uint8_t), half_buf, source);
    8888                if (bytes == 0)
    8989                        break;
Note: See TracChangeset for help on using the changeset viewer.