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

Ed Wildgoose lists at wildgooses.com
Thu Oct 7 16:29:58 UTC 2004


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.

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

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)

Ed W





More information about the mythtv-dev mailing list