summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/loopcontrol.cpp
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/loopcontrol.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/loopcontrol.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/core/multimedia/opieplayer/loopcontrol.cpp b/core/multimedia/opieplayer/loopcontrol.cpp
index cb8de8a..4b2827e 100644
--- a/core/multimedia/opieplayer/loopcontrol.cpp
+++ b/core/multimedia/opieplayer/loopcontrol.cpp
@@ -223,3 +223,2 @@ void LoopControl::startAudio() {
223 223
224//qDebug("start audio");
225 audioMutex->lock(); 224 audioMutex->lock();
@@ -239,10 +238,10 @@ void LoopControl::startAudio() {
239 238
240// if ( ( sampleWaitTime > 2000 ) && ( sampleWaitTime < 20000 ) ) { 239// if ( ( sampleWaitTime > 2000 ) && ( sampleWaitTime < 20000 ) ) {
241// usleep( (long)((double)sampleWaitTime * 1000000.0 / freq) ); 240// usleep( (long)((double)sampleWaitTime * 1000000.0 / freq) );
242// } 241// }
243// else if ( sampleWaitTime <= -5000 ) { 242// else if ( sampleWaitTime <= -5000 ) {
244// qDebug("need to catch up by: %li (%i,%li)", -sampleWaitTime, currentSample, sampleWeShouldBeAt ); 243// // qDebug("need to catch up by: %li (%i,%li)", -sampleWaitTime, currentSample, sampleWeShouldBeAt );
245// //mediaPlayerState->curDecoder()->audioSetSample( sampleWeShouldBeAt, stream ); 244// //mediaPlayerState->curDecoder()->audioSetSample( sampleWeShouldBeAt, stream );
246// currentSample = sampleWeShouldBeAt; 245// currentSample = sampleWeShouldBeAt;
247// } 246// }
248 247
@@ -381,3 +380,3 @@ bool LoopControl::init( const QString& filename ) {
381 channels = mediaPlayerState->curDecoder()->audioChannels( astream ); 380 channels = mediaPlayerState->curDecoder()->audioChannels( astream );
382 qDebug( "LC- channels = %d", channels ); 381// qDebug( "LC- channels = %d", channels );
383 382
@@ -391,3 +390,3 @@ bool LoopControl::init( const QString& filename ) {
391 freq = mediaPlayerState->curDecoder()->audioFrequency( astream ); 390 freq = mediaPlayerState->curDecoder()->audioFrequency( astream );
392 qDebug( "LC- frequency = %d", freq ); 391// qDebug( "LC- frequency = %d", freq );
393 392
@@ -395,7 +394,9 @@ bool LoopControl::init( const QString& filename ) {
395 int bits_per_sample; 394 int bits_per_sample;
396 if ( mediaPlayerState->curDecoder()->pluginName() == QString("LibWavPlugin") ) { 395 if ( mediaPlayerState->curDecoder()->pluginName() == QString("WavPlugin") ) {
397 bits_per_sample =(int) mediaPlayerState->curDecoder()->getTime(); 396 bits_per_sample =(int) mediaPlayerState->curDecoder()->getTime();
398 qDebug("using stupid hack"); 397// qDebug("using stupid hack");
399 } else { 398 } else {
400 bits_per_sample=0; 399 bits_per_sample=0;
400// freq=44100;
401 channels=2;
401 } 402 }