135 |
|
|
136 |
if (use_dev_mixer) |
if (use_dev_mixer) |
137 |
{ |
{ |
138 |
if ((fd_mix = open( "/dev/mixer", O_RDWR|O_NONBLOCK )) == -1 ) |
if ((fd_mix = open("/dev/mixer", O_RDWR | O_NONBLOCK)) == -1) |
139 |
{ |
{ |
140 |
perror("open /dev/mixer"); |
perror("open /dev/mixer"); |
141 |
return; |
return; |
228 |
{ |
{ |
229 |
long long duration; |
long long duration; |
230 |
long elapsed; |
long elapsed; |
231 |
|
|
232 |
gettimeofday(&tv, NULL); |
gettimeofday(&tv, NULL); |
233 |
duration = |
duration = (out->size * (1000000 / (g_samplewidth * g_snd_rate))); |
234 |
(out->size * (1000000 / |
elapsed = (tv.tv_sec - startedat_s) * 1000000 + (tv.tv_usec - startedat_us); |
|
(g_samplewidth * g_snd_rate))); |
|
|
elapsed = |
|
|
(tv.tv_sec - startedat_s) * 1000000 + |
|
|
(tv.tv_usec - startedat_us); |
|
235 |
|
|
236 |
if ( elapsed >= (duration * 7) / 10 ) |
if (elapsed >= (duration * 7) / 10) |
237 |
{ |
{ |
238 |
rdpsnd_send_completion(packet->tick, packet->index); |
rdpsnd_send_completion(packet->tick, packet->index); |
239 |
free(out->data); |
free(out->data); |