History

examples/audio_out.c : Fix gcc-4.3 compiler warning.

Erik de Castro Lopo committed 18 years ago

Commit 028669f1 parent a0954972 files · +7 −2Browse files

Unified · Split

2 files
  1. ChangeLog +5 −0
  2. examples/audio_out.c +2 −2
ChangeLog+5−0
@@ -1,3 +1,8 @@
12008-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
12008-10-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>62008-10-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
2 7
3 * doc/faq.html8 * doc/faq.html
examples/audio_out.c+2−2
@@ -119,7 +119,7 @@ linux_play (get_audio_callback_t callback, AUDIO_OUT *audio_out, void *callback_ · 118 unmodified lines
119{ LINUX_AUDIO_OUT *linux_out ;119{ LINUX_AUDIO_OUT *linux_out ;
120 static float float_buffer [BUFFER_LEN] ;120 static float float_buffer [BUFFER_LEN] ;
121 static short buffer [BUFFER_LEN] ;121 static short buffer [BUFFER_LEN] ;
122 int k, readcount ;122 int k, readcount, ignored ;
123 123
124 if ((linux_out = (LINUX_AUDIO_OUT*) audio_out) == NULL)124 if ((linux_out = (LINUX_AUDIO_OUT*) audio_out) == NULL)
125 { printf ("linux_play : AUDIO_OUT is NULL.\n") ;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 while ((readcount = callback (callback_data, float_buffer, BUFFER_LEN / linux_out->channels)))134 while ((readcount = callback (callback_data, float_buffer, BUFFER_LEN / linux_out->channels)))
135 { for (k = 0 ; k < readcount * linux_out->channels ; k++)135 { for (k = 0 ; k < readcount * linux_out->channels ; k++)
136 buffer [k] = lrint (32767.0 * float_buffer [k]) ;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 return ;140 return ;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t