[mythtv] patch: MyThTV with ARTS
Ed Wildgoose
lists at wildgooses.com
Fri Nov 12 15:35:21 UTC 2004
Martin Bene wrote:
>>Hmm, curious. I haven't double checked CVS, but I think I am
>>compiling
>>the arts driver up here without any problems... I will double check
>>those items. Perhaps I missed something off the patch
>>
>>
>
>Just tried it myself: CVS as of 4 hours ago doesnt't seem to compile
>with arts:
>
>
Aha, that's because I really cocked things up... Please try the
following patch which at least lets things compile. Please offer good
debugging if something doesn't work from here on in because I am not
running arts here.
Sorry for that gross cockup... Oh well.
Ed W
P.S. Isaac if you do see this message, then please add the attached
patch to CVS.
-------------- next part --------------
--- ../mythtv.20041109/libs/libmyth/audiooutputarts.cpp 2004-10-29 12:15:01.000000000 +0100
+++ libs/libmyth/audiooutputarts.cpp 2004-11-12 15:30:10.153329905 +0000
@@ -10,8 +10,8 @@
AudioOutputARTS::AudioOutputARTS(QString audiodevice, int audio_bits,
int audio_channels, int audio_samplerate,
AudioOutputSource source, bool set_initial_vol)
- : AudioOutputBase(audiodevice, laudio_bits,
- laudio_channels, laudio_samplerate, source, set_initial_vol)
+ : AudioOutputBase(audiodevice, audio_bits,
+ audio_channels, audio_samplerate, source, set_initial_vol)
{
// our initalisation
pcm_handle = NULL;
@@ -34,7 +34,7 @@
pcm_handle = NULL;
}
-void AudioOutputARTS::OpenDevice()
+bool AudioOutputARTS::OpenDevice()
{
arts_stream_t stream;
int err;
@@ -53,7 +53,7 @@
{
Error(QString("Opening ARTS sound device failed, the error was: %1")
.arg(arts_error_text(err)));
- return;
+ return false;
}
stream = arts_play_stream(audio_samplerate, audio_bits, audio_channels,
"mythtv");
@@ -63,14 +63,9 @@
audio_bits * audio_channels * audio_samplerate / 8);
pcm_handle = stream;
-}
-void AudioOutputARTS::Reset(void)
-{
- if (pcm_handle == NULL)
- return;
- audbuf_timecode = 0;
- // FIXME: kedl: not sure what else could be required here?
+ // Device opened successfully
+ return true;
}
void AudioOutputARTS::WriteAudio(unsigned char *aubuf, int size)
@@ -80,14 +75,14 @@
if (pcm_handle == NULL)
return;
- err = arts_write(pcm_handle, aubuf,
- frames * audio_bits / 8 * audio_channels);
+ err = arts_write(pcm_handle, aubuf, size);
if (err < 0)
{
// FIXME: Fatal?
VERBOSE(VB_IMPORTANT, QString("Write error: %1")
.arg(arts_error_text(err)));
return;
+ }
}
inline int AudioOutputARTS::getBufferedOnSoundcard(void)
More information about the mythtv-dev
mailing list