# HG changeset patch # User Matti Hamalainen # Date 1210273623 -10800 # Node ID 8d09a4d017ea34561b67ad189f3375fbe095eff2 # Parent b119d6f2e6c89255e97692635be57efa994e01c4 Using a static buffer, eh? Don't. Just don't. diff -r b119d6f2e6c8 -r 8d09a4d017ea src/sndfile/plugin.c --- a/src/sndfile/plugin.c Thu May 08 22:05:21 2008 +0300 +++ b/src/sndfile/plugin.c Thu May 08 22:07:03 2008 +0300 @@ -366,7 +366,7 @@ static gpointer play_loop (gpointer arg) { - static gshort buffer[BUFFER_SIZE]; + gshort buffer[BUFFER_SIZE]; gint samples; InputPlayback *playback = arg; @@ -391,7 +391,7 @@ } playback->pass_audio(playback, FMT_S16_NE, sfinfo.channels, - samples * sizeof (short), buffer, &playback->playing); + samples * sizeof(buffer[0]), buffer, &playback->playing); } else { while(playback->output->buffer_playing()) { @@ -454,7 +454,7 @@ bit_rate = sfinfo.samplerate * pcmbitwidth; if (sfinfo.samplerate > 0) - song_length = (int) ceil (1000.0 * sfinfo.frames / sfinfo.samplerate); + song_length = (gint) ceil (1000.0 * sfinfo.frames / sfinfo.samplerate); else song_length = 0;