]> git.sesse.net Git - vlc/blobdiff - modules/audio_output/sndio.c
DirectSound: apply volume attenuation with DirectSound
[vlc] / modules / audio_output / sndio.c
index 91f620d8dfc033c907498976b440d74ee4fc49aa..17fcaed5767d771b3dd96b8d30d891927e845938 100644 (file)
@@ -167,20 +167,7 @@ static void Play (audio_output_t *aout, block_t *block)
         mtime_t delay = par.bufsz * CLOCK_FREQ / aout->format.i_rate;
 
         delay = block->i_pts - (mdate () - delay);
-        if (delay > 0)
-        {
-            size_t frames = (delay * aout->format.i_rate) / CLOCK_FREQ;
-            msg_Dbg (aout, "prepending %zu zeroes", frames);
-
-            void *pad = calloc (frames, aout->format.i_bytes_per_frame);
-            if (likely(pad != NULL))
-            {
-                sio_write (sio, pad, frames * aout->format.i_bytes_per_frame);
-                free (pad);
-            }
-        }
-        else
-            aout_TimeReport (aout, block->i_pts - delay);
+        aout_TimeReport (aout, block->i_pts - delay);
     }
 
     while (block->i_buffer > 0 && !sio_eof (sio))