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

Nehal nehalmistry at gmx.net
Mon Mar 29 00:54:28 CEST 2004

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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: endsound-revision2.diff
Type: application/octet-stream
Size: 2107 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20040328/a8f7d7a1/attachment.obj>

More information about the MPlayer-dev-eng mailing list