[mythtv] [PATCH] : small cleanup
manu
eallaud at yahoo.fr
Sun Nov 9 18:12:53 EST 2003
Hi all,
this is my first patch for myth, tell me if I got it wrong.
The patch speaks for itself, it is trivial, it is against current cvs
file is libs/libmyth/audiooutputoss.cpp
Next thing : in libs/libmyth/audiooutputalsa.cpp line 156 I think that
the calculation
audio_bytes_per_sample = audio_channels * audio_bits / 8;
is wrong when audio_bits is different from 8 (which can occur if I read
correctly the following lines).
Bye
Manu
-------------- next part --------------
--- ../../../mythtv-cvs/mythtv/libs/libmyth/audiooutputoss.cpp 2003-10-23 22:28:34.000000000 +0200
+++ libs/libmyth/audiooutputoss.cpp 2003-11-09 22:46:29.000000000 +0100
@@ -227,16 +227,16 @@
while ((written < size) &&
((lw = write(audiofd, tmpbuf, size - written)) > 0))
{
- if (lw == -1)
- {
- cerr << "Error writing to audio device, exiting\n";
- close(audiofd);
- audiofd = -1;
- return;
- }
written += lw;
tmpbuf += lw;
}
+ if (lw < 0)
+ {
+ cerr << "Error writing to audio device, exiting\n";
+ close(audiofd);
+ audiofd = -1;
+ return;
+ }
}
void AudioOutputOSS::SetTimecode(long long timecode)
More information about the mythtv-dev
mailing list