[mythtv] [PATCH] volume control for OSS and ALSA

Isaac Richards ijr at po.cwru.edu
Wed Oct 27 22:20:10 UTC 2004


On Wednesday 27 October 2004 06:02 pm, Ed Wildgoose wrote:
> This sounds nearly perfect, except....
>
> ...since AudioOutputBase is only an optional feature, you can't really
> include base code there, like the generic volume control...  Consider
> for example the DirectX class which doesn't inherit from
> AudioOutputBase, or some new class which is someday written and uses
> something else.
>
> Instead, I suggest that we create a new class, (say VolumeControl),
> which contains everything you added to AudioOutputBase, but make the
> very base class "AudioOutput" inherit from the VolumeControl class.  In
> this way, EVERY class will get the code (makes sense?).  It's not a big
> change, just a copy and paste operation.  The code which uses the class
> will not even tell that we have done this.

That doesn't really make any sense.  Every audio output class is going to have 
to deal with volume somehow, so it makes sense for the common methods to be 
in the base class that all audio output classes inherit from.  If they don't 
inherit from it, they're broken.

Isaac


More information about the mythtv-dev mailing list