Mercurial > audlegacy-plugins
comparison src/OSS/audio.c @ 1676:aee4ebea943a
xmms_usleep() was removed, use g_usleep()
| author | Matti Hamalainen <ccr@tnsp.org> |
|---|---|
| date | Sun, 09 Sep 2007 22:25:40 +0300 |
| parents | 12a744b04174 |
| children | 8c93d207a4d9 |
comparison
equal
deleted
inserted
replaced
| 1675:ae9b0327b620 | 1676:aee4ebea943a |
|---|---|
| 303 input.format.xmms, | 303 input.format.xmms, |
| 304 input.frequency, input.channels); | 304 input.frequency, input.channels); |
| 305 #endif | 305 #endif |
| 306 if (realtime && !ioctl(fd, SNDCTL_DSP_GETOSPACE, &abuf_info)) { | 306 if (realtime && !ioctl(fd, SNDCTL_DSP_GETOSPACE, &abuf_info)) { |
| 307 while (abuf_info.bytes < length) { | 307 while (abuf_info.bytes < length) { |
| 308 xmms_usleep(10000); | 308 g_usleep(10000); |
| 309 if (ioctl(fd, SNDCTL_DSP_GETOSPACE, &abuf_info)) | 309 if (ioctl(fd, SNDCTL_DSP_GETOSPACE, &abuf_info)) |
| 310 break; | 310 break; |
| 311 } | 311 } |
| 312 } | 312 } |
| 313 | 313 |
| 509 oss_flush(gint time) | 509 oss_flush(gint time) |
| 510 { | 510 { |
| 511 if (!realtime) { | 511 if (!realtime) { |
| 512 flush = time; | 512 flush = time; |
| 513 while (flush != -1) | 513 while (flush != -1) |
| 514 xmms_usleep(10000); | 514 g_usleep(10000); |
| 515 } | 515 } |
| 516 else { | 516 else { |
| 517 ioctl(fd, SNDCTL_DSP_RESET, 0); | 517 ioctl(fd, SNDCTL_DSP_RESET, 0); |
| 518 close(fd); | 518 close(fd); |
| 519 fd = open(device_name, O_WRONLY); | 519 fd = open(device_name, O_WRONLY); |
| 564 if (!oss_used()) | 564 if (!oss_used()) |
| 565 ioctl(fd, SNDCTL_DSP_POST, 0); | 565 ioctl(fd, SNDCTL_DSP_POST, 0); |
| 566 } | 566 } |
| 567 } | 567 } |
| 568 else | 568 else |
| 569 xmms_usleep(10000); | 569 g_usleep(10000); |
| 570 oss_calc_device_buffer_used(); | 570 oss_calc_device_buffer_used(); |
| 571 if (do_pause && !paused) { | 571 if (do_pause && !paused) { |
| 572 do_pause = FALSE; | 572 do_pause = FALSE; |
| 573 paused = TRUE; | 573 paused = TRUE; |
| 574 /* | 574 /* |
