[MPlayer-dev-eng] Re: [PATCH] real muting
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Nov 20 14:03:42 CET 2005
Hi,
On Sun, Nov 20, 2005 at 01:09:16PM +0100, Alban Bedel wrote:
> On Sun, 20 Nov 2005 11:17:30 +0100
> Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:
> > the attached patch implements real muting (i.e. the audio device gets
> > paused).
>
> Having a real muting (when available at the driver/hw level) is a good
> idea, but pausing the ao to simulate this seems like a really bad idea
> to me.
Well, what else is real muting supposed to mean? What you state is IMHO
just a broken workaround for buggy sound drivers that do not allow the
volume to be set to 0. For me real muting means no data is passed to the
ao.
> > It currently disables the "set volume to 0" part, too, this probably
> > should be an option (suggestions for name + values?).
> >
> > Please test it, I'm sure it will cause problems in some cases, e.g.
> > with -ao alsa the movie makes a short skip forward when muting.
>
> The video is synched on the soundcard, so this method is just asking for
> troubles. Some ao will keep their buffer when pausing, so the sound
> migth restart with a rest of what was played before, then brutaly jump
> to a completly different signal, which may very well produce bad
> artifacts. If the ao drop the buffer, then it have to be refilled leading
> to some jump in the video. All in all I bet this will work smoothly
> (ie like now) in perhaps 1% of the cases.
There is a reset function that is supposed to clear the buffer, if it's
not implemented correctily seeking and things like that won't work
either.
Also does it matter if it's completely smooth or not (it should be
optional anyway)?
But there is a reason I asked fo testing...
> Why not just add a control() to the ao and implement it there ? That way
> ao that have a real muting (like alsa) could use it, other would just
> fallback on the current implementation and set the volume to 0 which
> is more than good enouth in 99% of the cases.
Where/how does alsa have real muting? The only thing I see is playback
control, but what exactly does it do? Does it free up the device for use
by other players? Does it stop the callback functions that pull data and
consume CPU? I don't think so because that then would cause MPlayer to
hang instead of mute. I really don't know what you're thinking of (not
to mention that in case of a control every ao would have to be changed
to support it - whereas this method in theory should work for all as is).
Greetings,
Reimar Döffinger
More information about the MPlayer-dev-eng
mailing list