[mythtv] [PATCH] small oss define patch (prelude to another ALSA patch)

Jeremiah Morris jm at whpress.com
Thu Oct 7 13:32:59 UTC 2004


On 7 Oct 2004, at 2:59 AM, Ed Wildgoose wrote:

> I wonder whether it wouldn't make more sense to abstract the volume 
> control idea.  Assume a range or 0-100, and then add a "ChangeVolume" 
> function to each of the audio output classes.  The audiooutput code 
> can be assumed to understand how to change volume for that driver for 
> example?

I like that idea.  I'm not sure why the volume was separate from the 
other audio functions, but it makes a lot of sense to have that 
functionality next to the rest of the code that opens the audio device, 
etc.  I never bothered to get volume working for Core Audio, whereas if 
it had been just one more method in the same file, I would have done it 
straight away.

> For some of the modules volume control will be no more advanced than 
> changing the volume of the sound sent to the driver

Maybe that would be the default implementation in the base class, to 
transform the samples as they come in?  The subclasses could turn this 
off and do their own volume manipulation (Jack doing the transform on 
the high-quality floats, OSS using ioctl, etc.).  Or, maybe it's not 
worth it, if none of the drivers would rely on the default 
implementation.

- Jeremiah



More information about the mythtv-dev mailing list