[mythtv] Re: [PATCH] mono support, take two
Jim Radford
mythtv-dev@snowman.net
Sat, 16 Nov 2002 08:43:04 -0800
On Tue, Nov 19, 2002 at 08:49:53PM -0500, Isaac Richards wrote:
> Is there really a need for the audio_ioctl_int stuff? It's, well, ugly, IMO.
It is there, more or less, just to gather the debugging prints in one
location so I could turn them off at once, so that I didn't keep
having cut and paste errors :-), and so that the error checking was
uniform. I left them in so you could see why the other code is
necessary (see below). You can replace audio_ioctl_int with ioctl and
everything should work fine.
> There shouldn't be a need for detecting if the samplerate/channels changed in
> the middle of the stream, either..
The information seems to only be available "in the middle of the
stream", and it only runs once as far as I can tell. The code can be
moved out-of-line if you're worried about cache footprint. The
problem is that lame, like oss, doesn't use what you tell it to.
Specifically when I tell it to do one channel and mono it doesn't do
it, it converts it to two channels. So the myth header says 1 channel
(which it would be without compression) and the lame header says 2.
So first we set up one channel and then lame comes along and says, no
I really used two.
The overall architectural thing that could be fixed here would be to
figure out what the input/output/stream support before starting up and
then choosing the appropriate mode and possibly conversion routines.
-Jim