[mythtv] Patch: Big audio code update (please test)

David George david at thegeorges.us
Thu Oct 7 18:48:18 UTC 2004


On 10/7/2004 12:29 PM, Ed Wildgoose wrote:

> Hi, below is a big patch to the audio code to:
>
> - Cleanup and abstract the big repeated copies of the code
> - Add in a Jack output library
> - Add in a very high quality resampling library (libsamplerate)
>
> I would be grateful if Alsa, OSS, and Jack users could please test this
> code.  I haven't yet modified the other output libraries, but this only
> takes about 20 mins each, just haven't had any time to do this yet.

I can hammer on the ALSA part.

>
> You should apply all the patches and copy the new files into 
> libs/libmyth.
> Then install libsamplerate from here:
> http://www.mega-nerd.com/SRC/download.html  (gentoo users get it direct
> from portage)
> Then everything should build normally.
>
> http://www.wildgooses.com/downloads/myth_audio.tar.gz
>
>
> TODO:
>
> If anyone wants to help out then I would be grateful for help on the
> following:
>
> - Convert libsamplerate to a myth library.  Needs the makefile
> butchering and a patch submitting. (This really needs doing before we
> can commit to CVS)

I'll take a look at doing this.

> - Convert arts, directx and coreaudio output layers to this format
> (about 20 mins each)
> - Add a gui config option to set the resampler quality (lower quality is
> faster)
> - Move the mythmusic audio event code into the audiobase.cpp file
> - Convert the generic output layer to fire off the audio events as per
> myth music output loop.
> - Convert mythmusic to use the new audio library.

I am so looking forward to MythMusic supporting this.  I'm not sure I'll 
be able to help on this other than testing though.

> - Volume code to be moved to audio output libraries and generic volume
> control object implemented. (Say, arbitrary 0-100 scale)

I'll work on this.  I already had the volume control for ALSA finished, 
so we should have OSS and ALSA covered here fairly soon.  I agree with 
the 0-100 scale, it matches with the existing volume sliders in myth 
setup.  I already added ALSA code that gets the min and max volume from 
the mixer device and scales it to 0-100.

>
> Please let me know if you see any problems or regressions in the code.
> Since it's basically copy and paste, nothing should really have changed
> in terms of functionality.  If you find that your machine can't keep up
> with resampling, then either a) don't do it... or b) change the
> hardcoded value in audiooutputbase.cpp in reconfigure to use a lower
> setting (see the libsamplerate site for the API details, it's a one word
> change)

I try to spend some time on this tonight and let you know if I find 
anything.

--
David



More information about the mythtv-dev mailing list