summaryrefslogtreecommitdiff
path: root/core
authorllornkcor <llornkcor>2002-04-21 16:13:30 (UTC)
committer llornkcor <llornkcor>2002-04-21 16:13:30 (UTC)
commit392eb0350465565e2a849ada60e6734be025787b (patch) (unidiff)
tree44727c201e6ef8e4d61d6011180d41b46c8f4ea4 /core
parentd7ff40e1530a1aab578a3d3c3126c4367cf3e898 (diff)
downloadopie-392eb0350465565e2a849ada60e6734be025787b.zip
opie-392eb0350465565e2a849ada60e6734be025787b.tar.gz
opie-392eb0350465565e2a849ada60e6734be025787b.tar.bz2
fix unfixed stream stop
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiodevice.cpp1
-rw-r--r--core/multimedia/opieplayer/loopcontrol.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/core/multimedia/opieplayer/audiodevice.cpp b/core/multimedia/opieplayer/audiodevice.cpp
index 2087c7f..ad44abb 100644
--- a/core/multimedia/opieplayer/audiodevice.cpp
+++ b/core/multimedia/opieplayer/audiodevice.cpp
@@ -245,12 +245,13 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
245 //if ( capabilities & DSP_CAP_TRIGGER ) qDebug( "Sound card has precise trigger" ); 245 //if ( capabilities & DSP_CAP_TRIGGER ) qDebug( "Sound card has precise trigger" );
246 //if ( capabilities & DSP_CAP_MMAP ) qDebug( "Sound card can mmap" ); 246 //if ( capabilities & DSP_CAP_MMAP ) qDebug( "Sound card can mmap" );
247} 247}
248 248
249 249
250AudioDevice::~AudioDevice() { 250AudioDevice::~AudioDevice() {
251 qDebug("destryo audiodevice");
251#ifdef Q_OS_WIN32 252#ifdef Q_OS_WIN32
252 waveOutClose( (HWAVEOUT)d->handle ); 253 waveOutClose( (HWAVEOUT)d->handle );
253#else 254#else
254# ifndef KEEP_DEVICE_OPEN 255# ifndef KEEP_DEVICE_OPEN
255 close( d->handle ); // Now it should be safe to shut the handle 256 close( d->handle ); // Now it should be safe to shut the handle
256# endif 257# endif
diff --git a/core/multimedia/opieplayer/loopcontrol.cpp b/core/multimedia/opieplayer/loopcontrol.cpp
index 01596a0..7005886 100644
--- a/core/multimedia/opieplayer/loopcontrol.cpp
+++ b/core/multimedia/opieplayer/loopcontrol.cpp
@@ -245,13 +245,13 @@ void LoopControl::startAudio() {
245// //mediaPlayerState->curDecoder()->audioSetSample( sampleWeShouldBeAt, stream ); 245// //mediaPlayerState->curDecoder()->audioSetSample( sampleWeShouldBeAt, stream );
246// currentSample = sampleWeShouldBeAt; 246// currentSample = sampleWeShouldBeAt;
247// } 247// }
248 248
249 audioDevice->write( audioBuffer, samplesRead * 2 * channels ); 249 audioDevice->write( audioBuffer, samplesRead * 2 * channels );
250 250
251// if( mediaPlayerState->isStreaming == FALSE) 251 if( mediaPlayerState->isStreaming == FALSE)
252 audioSampleCounter = currentSample + samplesRead - 1; 252 audioSampleCounter = currentSample + samplesRead - 1;
253 253
254 moreAudio = readOk && (audioSampleCounter <= total_audio_samples); 254 moreAudio = readOk && (audioSampleCounter <= total_audio_samples);
255 255
256 } else { 256 } else {
257 257