[MPlayer-dev-eng] [PATCH] Real mute

Oded Shimon ods15 at ods15.dyndns.org
Wed Nov 3 02:15:52 CET 2004


I created a patch that truly mutes MPlayer, no just sets the volume to zero.
With this patch, MPlayer still decodes the audio, but nothing is forwarded to 
audio out. More so, if there is a big audio desync, MPlayer will dump the 
audio and fix the desync. During muted times, autosync is turned off.

I can alternatively make it not decode the audio at all, but at a price, when 
unmuted, MPlayer will _HARD_ drop one frame (breaking image). I can't find 
any way around this. Also I don't think it will work at all with audio only 
files. I decided to use the first method.

It supports playing only audio, then what it does is sleep 10ms, and drop 10ms 
of audio each time, and then repeat the loop. because of this there is a 
slight non-realtime problem, as the loop takes about 0.1ms to process (10.1ms 
passed, and only 10ms of audio was dumped). This is hardly noticeable as 
during this time there is no video or audio, and the mute in general is 
pretty redundant.

mixer mute is no longer used. all it does it change a flag. When mute is first 
set, audio_out is reset() to clean audio.

compiled and tested. :)

- ods15
-------------- next part --------------
A non-text attachment was scrubbed...
Name: real-mute.patch
Type: text/x-diff
Size: 2079 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20041103/4dd1b615/attachment.patch>


More information about the MPlayer-dev-eng mailing list