summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/loopcontrol.cpp
authorllornkcor <llornkcor>2002-03-18 01:50:17 (UTC)
committer llornkcor <llornkcor>2002-03-18 01:50:17 (UTC)
commitc09cb25eb6bbf31bed0d4a415802469cfd1efedf (patch) (side-by-side diff)
tree86ced0fa482bd5fb244629f2baa1b1a4f25c9189 /core/multimedia/opieplayer/loopcontrol.cpp
parent848182342d81b4e6ab4ce6b75bdaa0b109828af3 (diff)
downloadopie-c09cb25eb6bbf31bed0d4a415802469cfd1efedf.zip
opie-c09cb25eb6bbf31bed0d4a415802469cfd1efedf.tar.gz
opie-c09cb25eb6bbf31bed0d4a415802469cfd1efedf.tar.bz2
added stuff and fixed stuff that I dont remember- plays w/o going to playlist among other things
Diffstat (limited to 'core/multimedia/opieplayer/loopcontrol.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/loopcontrol.cpp13
1 files changed, 7 insertions, 6 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
@@ -221,7 +221,6 @@ void LoopControl::startVideo() {
void LoopControl::startAudio() {
-//qDebug("start audio");
audioMutex->lock();
if ( moreAudio ) {
@@ -241,7 +240,7 @@ void LoopControl::startAudio() {
// usleep( (long)((double)sampleWaitTime * 1000000.0 / freq) );
// }
// else if ( sampleWaitTime <= -5000 ) {
-// qDebug("need to catch up by: %li (%i,%li)", -sampleWaitTime, currentSample, sampleWeShouldBeAt );
+// // qDebug("need to catch up by: %li (%i,%li)", -sampleWaitTime, currentSample, sampleWeShouldBeAt );
// //mediaPlayerState->curDecoder()->audioSetSample( sampleWeShouldBeAt, stream );
// currentSample = sampleWeShouldBeAt;
// }
@@ -379,7 +378,7 @@ bool LoopControl::init( const QString& filename ) {
int astream = 0;
channels = mediaPlayerState->curDecoder()->audioChannels( astream );
- qDebug( "LC- channels = %d", channels );
+// qDebug( "LC- channels = %d", channels );
if ( !total_audio_samples )
total_audio_samples = mediaPlayerState->curDecoder()->audioSamples( astream );
@@ -389,15 +388,17 @@ bool LoopControl::init( const QString& filename ) {
mediaPlayerState->setLength( total_audio_samples );
freq = mediaPlayerState->curDecoder()->audioFrequency( astream );
- qDebug( "LC- frequency = %d", freq );
+// qDebug( "LC- frequency = %d", freq );
audioSampleCounter = 0;
int bits_per_sample;
- if ( mediaPlayerState->curDecoder()->pluginName() == QString("LibWavPlugin") ) {
+ if ( mediaPlayerState->curDecoder()->pluginName() == QString("WavPlugin") ) {
bits_per_sample =(int) mediaPlayerState->curDecoder()->getTime();
- qDebug("using stupid hack");
+// qDebug("using stupid hack");
} else {
bits_per_sample=0;
+// freq=44100;
+ channels=2;
}
audioDevice = new AudioDevice( freq, channels, bits_per_sample);