[MPlayer-dev-eng] [PATCH] Load af_volume when needed

Dan Christiansen danchr at daimi.au.dk
Tue Jul 20 11:37:06 CEST 2004


Reimar Döffinger wrote:

> Hi,
>
>> This small patch loads af_volume whenever needed. I.e. in the case 
>> where the ao doesn't support volume, and it isn't already loaded. 
>> With this patch, ao_macosx has volume support out of the box :)
>
>
> Yes, this would be useful, I just didn't get to do it up to now.
> First question: wouldn't it make more sense to add this to the 
> set_volume function? I'd prefer if the volume filter didn't slow down 
> things for people who don't actually need it. You might have to modify 
> get_volume to return 90.0 by default when it can't get the volume...

It seems that, by default, the first call MPlayer does is get_volume(), 
and that if someone requests something related to volume, loading the 
filter is fine. In my opinion, the "correct" way of doing this would be 
to separate the actual getting and setting into a separate function, 
which tries to load the filter if necessary.

Doesn't af_volume already have a default value? Wouldn't it be a bad 
idea to duplicate this value somewhere else?

> I'd also like to have some status messages, replacing the 
> MSGTR_NeedAfVolume message like e.g. "inserting af_volume for software 
> volume control" and "couldn't insert af_volume". 

Perhaps simply a "Volume control not available" would do, the 
"inserting" could be restrained for verbose mode?

- Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3727 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20040720/98b4313f/attachment.bin>


More information about the MPlayer-dev-eng mailing list