Skip to content

Commit

Permalink
Fix compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
erikd committed Aug 15, 2011
1 parent 067263c commit c8c0372
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
11 changes: 11 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
2011-08-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>

* configure.ac
Add symbol support for kfreebsd-*-gnu-*.

* configure.ac doc/Makefile.am
Improve installation of html docs.

* examples/audio_out.c tests/callback_hang_test.c
Fix compiler warnings.

2011-02-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>

* tests/util.[ch]
Expand Down
4 changes: 2 additions & 2 deletions examples/audio_out.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ linux_play (get_audio_callback_t callback, AUDIO_OUT *audio_out, void *callback_
{ LINUX_AUDIO_OUT *linux_out ;
static float float_buffer [BUFFER_LEN] ;
static short buffer [BUFFER_LEN] ;
int k, readcount, ignored ;
int k, readcount ;

if ((linux_out = (LINUX_AUDIO_OUT*) audio_out) == NULL)
{ printf ("linux_play : AUDIO_OUT is NULL.\n") ;
Expand All @@ -133,7 +133,7 @@ linux_play (get_audio_callback_t callback, AUDIO_OUT *audio_out, void *callback_
while ((readcount = callback (callback_data, float_buffer, BUFFER_LEN / linux_out->channels)))
{ for (k = 0 ; k < readcount * linux_out->channels ; k++)
buffer [k] = lrint (32767.0 * float_buffer [k]) ;
ignored = write (linux_out->fd, buffer, readcount * linux_out->channels * sizeof (short)) ;
(void) write (linux_out->fd, buffer, readcount * linux_out->channels * sizeof (short)) ;
} ;

return ;
Expand Down
6 changes: 1 addition & 5 deletions tests/callback_hang_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,11 @@ callback_hang_test (int converter)
SRC_STATE *src_state ;

double src_ratio = 1.0 ;
long out_count ;
int current_out ;
int k, error ;

printf ("\tcallback_hang_test (%-28s) ....... ", src_get_name (converter)) ;
fflush (stdout) ;

current_out = 0 ;

/* Perform sample rate conversion. */
src_state = src_callback_new (input_callback, converter, 1, &error, NULL) ;
if (src_state == NULL)
Expand All @@ -93,7 +89,7 @@ callback_hang_test (int converter)
for (k = 0 ; k < ARRAY_LEN (pairs) ; k++)
{ alarm (1) ;
src_ratio = pairs [k].ratio ;
out_count = src_callback_read (src_state, src_ratio, pairs [k].count, output) ;
src_callback_read (src_state, src_ratio, pairs [k].count, output) ;
} ;

src_state = src_delete (src_state) ;
Expand Down

0 comments on commit c8c0372

Please sign in to comment.