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

attila attila at pai.kinali.ch
Sun Jul 18 14:16:33 CEST 2004


On Sun, Mar 28, 2004 at 02:54:28PM -0800, Nehal wrote:
> 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.

Dont apply this patch, it has CRLFs.
And yes, someone should comment it.

			Attila Kinali




More information about the MPlayer-dev-eng mailing list