changeset 2554:8d09a4d017ea

Using a static buffer, eh? Don't. Just don't.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 08 May 2008 22:07:03 +0300
parents b119d6f2e6c8
children 04b1b020be88
files src/sndfile/plugin.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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;