[mythtv]
Splitting out audio output code in preparation for native ALSA support
James Knight
foom at fuhm.net
Sat May 10 00:12:13 EDT 2003
Hi, I'm working on adding native ALSA support to Myth to avoid needing
to use the OSS emulation layer.
My plan for doing this is:
1) Split out audio output code from NuppelVideoPlayer and make a
generic base class for audio output
2) Add the ALSA output class.
3) Split out audio record code in NuppelVideoRecorder and make generic
base class for audio record
4) Add the ALSA input class.
5) Do the same sort of thing for the mixer control.
6) Update the configuration interface to support this, somehow.
I have done step 1 and started step 2. All the code in
NuppelVideoPlayer having to do with OSS DSP audio output is now in the
class AudioOutputDSP, which is a subclass of the pure virtual class
AudioOutput. AudioOutputALSA is half-implemented, but I have not
included that here.
I have attached the diffs to libmythtv.pro and
NuppelVideoPlayer.(cpp|h) as well as the new files AudioOutput.(cpp|h),
and AudioOutputDSP.(cpp|h).
I do have one question I posed in AudioOutputDSP::OutputAudioLoop about
its use of video_frame_rate to determine how many bytes should buffer
before sending the buffer to the sound hardware. As far as I can tell,
this is not necessary, and perhaps even detrimental with low framrates,
so I hardcoded it to 30.
I consider this code a first draft, and comments are certainly welcome.
This is based on current CVS code, and it works as far as I have
tested, except that, for the moment, I have completely commented out
the "NuppelVideoPlayer::ReencodeFile" function, as it was doing evil
things with the audio buffers that I haven't bothered to fix yet.
James
-------------- next part --------------
z'µìmjÛZrܲÇ+¹¶ÞtÖ¦y«.¶¶Óʦbq«b¢ñ8©J,Þ×öå¼zÀÞ±É赫ÚVå+úb¥êæj)jÛZrÛ?ÛM7Ó=ÿÞùs^9sö®v*(ºÚnµ¸§
More information about the mythtv-dev
mailing list