Unified · Split
| @@ -1,3 +1,8 @@ | ||
| 1 | +2008-10-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com> | |
| 2 | + | |
| 3 | + * examples/audio_out.c | |
| 4 | + Fix gcc-4.3 compiler warning. | |
| 5 | + | |
| 1 | 6 | 2008-10-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com> |
| 2 | 7 | |
| 3 | 8 | * doc/faq.html |
| @@ -119,7 +119,7 @@ linux_play (get_audio_callback_t callback, AUDIO_OUT *audio_out, void *callback_ · 118 unmodified lines | ||
| 119 | 119 | { LINUX_AUDIO_OUT *linux_out ; |
| 120 | 120 | static float float_buffer [BUFFER_LEN] ; |
| 121 | 121 | static short buffer [BUFFER_LEN] ; |
| 122 | − int k, readcount ; | |
| 122 | + int k, readcount, ignored ; | |
| 123 | 123 | |
| 124 | 124 | if ((linux_out = (LINUX_AUDIO_OUT*) audio_out) == NULL) |
| 125 | 125 | { printf ("linux_play : AUDIO_OUT is NULL.\n") ; |
| @@ -134,7 +134,7 @@ linux_play (get_audio_callback_t callback, AUDIO_OUT *audio_out, void *callback_ · 8 unmodified lines | ||
| 134 | 134 | while ((readcount = callback (callback_data, float_buffer, BUFFER_LEN / linux_out->channels))) |
| 135 | 135 | { for (k = 0 ; k < readcount * linux_out->channels ; k++) |
| 136 | 136 | buffer [k] = lrint (32767.0 * float_buffer [k]) ; |
| 137 | − write (linux_out->fd, buffer, readcount * linux_out->channels * sizeof (short)) ; | |
| 137 | + ignored = write (linux_out->fd, buffer, readcount * linux_out->channels * sizeof (short)) ; | |
| 138 | 138 | } ; |
| 139 | 139 | |
| 140 | 140 | return ; |