[MPlayer-dev-eng] [PATCH] win32 or sdl audio end doesn't play

Diego Biurrun diego at biurrun.de
Sun Apr 18 06:36:47 CEST 2004


Nehal writes:
> On Sat, 27 Mar 2004 20:51:25 -0800
> Nehal <nehalmistry at gmx.net> wrote:
> 
> > the end of audio doesn't play for -ao win32 and -ao sdl. it works for -ao oss because close()ing the sound device returns after the output buffers have been played. for sdl and win32, uninit() just closes it right away. i've added a while loop with a sleep so the audio threads can play the remaining data (this seems like the right way?!?!).
> > 
> > i've also attached a tiny test case. if you play with '-ao sdl' w/o this patch, mplayer will exit before any of the sound data gets played.
> > 
> > not sure about other output devices, i tried OSS, can someone please test the alsa output devices.
> > 
> > Nehal
> > 
> i have attached a revised patch, in ao_win32, there is a small crackle sometimes at the end of a file, dwBufferLength is more than it should be (never was noticed before because the unused before got filled before the waveBlock was played). also fixes a bug in ao_sdl where SDL_MixAudio mixes audio data onto itself, thus increasing the volume and sounding slightly distorted.
> 
> can someone apply this now please.

What about this patch?

Sascha, did you check/apply the win32 part?

Diego




More information about the MPlayer-dev-eng mailing list