summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/libmad/libmadplugin.cpp8
-rw-r--r--core/multimedia/opieplayer/loopcontrol.cpp4
-rw-r--r--core/multimedia/opieplayer/wavplugin/wavplugin.cpp2
3 files changed, 7 insertions, 7 deletions
diff --git a/core/multimedia/opieplayer/libmad/libmadplugin.cpp b/core/multimedia/opieplayer/libmad/libmadplugin.cpp
index b2b876f..9d04f7e 100644
--- a/core/multimedia/opieplayer/libmad/libmadplugin.cpp
+++ b/core/multimedia/opieplayer/libmad/libmadplugin.cpp
@@ -495,3 +495,3 @@ bool LibMadPlugin::audioReadSamples( short *output, int /*channels*/, long sampl
if ( samples == 0 )
- return TRUE;
+ return FALSE;
@@ -503,3 +503,3 @@ bool LibMadPlugin::audioReadSamples( short *output, int /*channels*/, long sampl
// else
- return TRUE;
+ return FALSE;
}
@@ -509,3 +509,3 @@ bool LibMadPlugin::audioReadSamples( short *output, int /*channels*/, long sampl
if ( decode( output, samples, samplesMade ) )
- return FALSE;
+ return TRUE;
else
@@ -523,3 +523,3 @@ bool LibMadPlugin::audioReadSamples( short *output, int /*channels*/, long sampl
*/
- return TRUE;
+ return FALSE;
}
diff --git a/core/multimedia/opieplayer/loopcontrol.cpp b/core/multimedia/opieplayer/loopcontrol.cpp
index 93a6e3f..6dfd057 100644
--- a/core/multimedia/opieplayer/loopcontrol.cpp
+++ b/core/multimedia/opieplayer/loopcontrol.cpp
@@ -230,3 +230,3 @@ void LoopControl::startAudio() {
long samplesRead = 0;
- mediaPlayerState->curDecoder()->audioReadSamples( (short*)audioBuffer, channels, 1024, samplesRead, stream );
+ bool readOk=mediaPlayerState->curDecoder()->audioReadSamples( (short*)audioBuffer, channels, 1024, samplesRead, stream );
long sampleWeShouldBeAt = long( playtime.elapsed() ) * freq / 1000;
@@ -245,3 +245,3 @@ void LoopControl::startAudio() {
- moreAudio = audioSampleCounter <= total_audio_samples;
+ moreAudio = readOk && (audioSampleCounter <= total_audio_samples);
diff --git a/core/multimedia/opieplayer/wavplugin/wavplugin.cpp b/core/multimedia/opieplayer/wavplugin/wavplugin.cpp
index 60a0024..a6bd974 100644
--- a/core/multimedia/opieplayer/wavplugin/wavplugin.cpp
+++ b/core/multimedia/opieplayer/wavplugin/wavplugin.cpp
@@ -325,3 +325,3 @@ bool WavPlugin::audioReadSamples( short *output, int channels, long samples, lon
debugMsg( "WavPlugin::audioReadSamples" );
- return !d->add( output, samples, samplesMade, channels != 1 );
+ return d->add( output, samples, samplesMade, channels != 1 );
}