[MPlayer-dev-eng] [PATCH] Fix ao_dsound looping tail audio when shorter than video
David Bolen
db3l.net at gmail.com
Sat Mar 7 03:16:21 CET 2009
compn <tempn at twmi.rr.com> writes:
> On Fri, 06 Mar 2009 19:08:16 -0500, David Bolen wrote:
>>What a pain. Ok, clearly more complicated (so I'm glad win32 is
>>working for me at the moment). Sorry for the bogus patch ... I'll try
>>to revisit it when I have a moment, since there are some attractive
>>aspects of dsound (such as independent volume) that I might prefer
>>over win32 if I can get this working.
>
> independent volume? like -softvol ?
No, I was referring to the fact that multiple mplayers playing
simultaneously have volumes independent of each other. The volume
level of a single dsound application appears to be from 0-100% of the
current master system volume (or maybe the wave mixer input) but is
capped by and never actually affects that master volume, and each
mplayer can be at a different volume. And when mplayer exits it has
no impact on subsequent executions. I'm not really familiar with
DirectSound at all, but it appears to be part of its model. It's also
the way Windows Media Player appears to handle volume.
That's in contrast to ao_win32 which directly controls the master wave
mixer input volume and thus multiple mplayers each trying to control
volume will conflict with each other, as well as leaving the master
volume in whatever state it was last set to even after application
exit.
In my environment (two embedded mplayers per machine) I stopped using
mplayer (with ao_win32) itself for volume control since it always sets
both channels of the wave volume, and instead manipulate the wave
mixer level myself since I know which channel each mplayer wants to
use and can leave the other channel intact. But it's extra work I
didn't have to do with ao_dsound, and can be a bit more error prone in
terms of accidentally not restoring the volume when done and so forth
(very confusing the first time to lose sound, yet see the volume in
the task bar be at maximum - I had to open up the full volume control
to see the wave input portion of the mixer was muted). It's working
well now, but I'd be happy enough to turn off that code if I went back
to ao_dsound.
-- David
More information about the MPlayer-dev-eng
mailing list