summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiodevice.cpp8
-rw-r--r--core/multimedia/opieplayer/loopcontrol.cpp16
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp47
-rw-r--r--core/multimedia/opieplayer/playlistwidget.h12
4 files changed, 44 insertions, 39 deletions
diff --git a/core/multimedia/opieplayer/audiodevice.cpp b/core/multimedia/opieplayer/audiodevice.cpp
index 59136af..11fd9e8 100644
--- a/core/multimedia/opieplayer/audiodevice.cpp
+++ b/core/multimedia/opieplayer/audiodevice.cpp
@@ -111,3 +111,3 @@ void AudioDevice::getVolume( unsigned int& leftVolume, unsigned int& rightVolume
111 if ( waveOutGetVolume( handle, (LPDWORD)&volume ) ) 111 if ( waveOutGetVolume( handle, (LPDWORD)&volume ) )
112 qDebug( "get volume of audio device failed" ); 112// qDebug( "get volume of audio device failed" );
113 waveOutClose( handle ); 113 waveOutClose( handle );
@@ -153,3 +153,3 @@ void AudioDevice::setVolume( unsigned int leftVolume, unsigned int rightVolume,
153 if ( waveOutSetVolume( handle, volume ) ) 153 if ( waveOutSetVolume( handle, volume ) )
154 qDebug( "set volume of audio device failed" ); 154// qDebug( "set volume of audio device failed" );
155 waveOutClose( handle ); 155 waveOutClose( handle );
@@ -194,3 +194,3 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
194 d->bytesPerSample = bps; 194 d->bytesPerSample = bps;
195 qDebug("%d",bps); 195// qDebug("%d",bps);
196 int format=0; 196 int format=0;
@@ -200,3 +200,3 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
200 200
201 qDebug("AD- freq %d, channels %d, b/sample %d, bitrate %d",f,chs,bps,format); 201// qDebug("AD- freq %d, channels %d, b/sample %d, bitrate %d",f,chs,bps,format);
202 connect( qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) ); 202 connect( qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) );
diff --git a/core/multimedia/opieplayer/loopcontrol.cpp b/core/multimedia/opieplayer/loopcontrol.cpp
index 859a67a..1ae0059 100644
--- a/core/multimedia/opieplayer/loopcontrol.cpp
+++ b/core/multimedia/opieplayer/loopcontrol.cpp
@@ -237,10 +237,10 @@ void LoopControl::startAudio() {
237 237
238// if ( ( sampleWaitTime > 2000 ) && ( sampleWaitTime < 5000 ) ) { 238 if ( ( sampleWaitTime > 2000 ) && ( sampleWaitTime < 20000 ) ) {
239// usleep( (long)((double)sampleWaitTime * 1000000.0 / freq) ); 239 usleep( (long)((double)sampleWaitTime * 1000000.0 / freq) );
240// } 240 }
241// else if ( sampleWaitTime <= -5000 ) { 241 else if ( sampleWaitTime <= -5000 ) {
242// qDebug("need to catch up by: %li (%i,%li)", -sampleWaitTime, currentSample, sampleWeShouldBeAt ); 242 qDebug("need to catch up by: %li (%i,%li)", -sampleWaitTime, currentSample, sampleWeShouldBeAt );
243// //mediaPlayerState->curDecoder()->audioSetSample( sampleWeShouldBeAt, stream ); 243 //mediaPlayerState->curDecoder()->audioSetSample( sampleWeShouldBeAt, stream );
244// currentSample = sampleWeShouldBeAt; 244 currentSample = sampleWeShouldBeAt;
245// } 245 }
246 246
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp
index 4e1543e..269aed8 100644
--- a/core/multimedia/opieplayer/playlistwidget.cpp
+++ b/core/multimedia/opieplayer/playlistwidget.cpp
@@ -41,3 +41,3 @@
41#include <qpoint.h> 41#include <qpoint.h>
42#include <qtimer.h> 42//#include <qtimer.h>
43 43
@@ -100,4 +100,4 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
100 d->current = NULL; 100 d->current = NULL;
101 menuTimer = new QTimer( this ,"menu timer"), 101// menuTimer = new QTimer( this ,"menu timer"),
102 connect( menuTimer, SIGNAL( timeout() ), SLOT( addSelected() ) ); 102// connect( menuTimer, SIGNAL( timeout() ), SLOT( addSelected() ) );
103 103
@@ -206,7 +206,9 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
206 if(dit.current()->file().find("/mnt/cf") != -1 ) storage="CF"; 206 if(dit.current()->file().find("/mnt/cf") != -1 ) storage="CF";
207 else if(dit.current()->file().find("/mnt/hda") != -1 ) storage="CF";
207 else if(dit.current()->file().find("/mnt/card") != -1 ) storage="SD"; 208 else if(dit.current()->file().find("/mnt/card") != -1 ) storage="SD";
208 else storage="RAM"; 209 else storage="RAM";
209 210 if ( QFile( dit.current()->file()).exists() ) {
210 newItem= /*(void)*/ new QListViewItem( audioView, dit.current()->name(), QString::number( QFile( dit.current()->file()).size() ), storage); 211 newItem= /*(void)*/ new QListViewItem( audioView, dit.current()->name(), QString::number( QFile( dit.current()->file()).size() ), storage);
211 newItem->setPixmap(0, Resource::loadPixmap( "mpegplayer/musicfile" )); 212 newItem->setPixmap(0, Resource::loadPixmap( "mpegplayer/musicfile" ));
213 }
212 } 214 }
@@ -231,2 +233,3 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
231 if( Vdit.current()->file().find("/mnt/cf") != -1 ) storage="CF"; 233 if( Vdit.current()->file().find("/mnt/cf") != -1 ) storage="CF";
234 else if( Vdit.current()->file().find("/mnt/hda") != -1 ) storage="CF";
232 else if( Vdit.current()->file().find("/mnt/card") != -1 ) storage="SD"; 235 else if( Vdit.current()->file().find("/mnt/card") != -1 ) storage="SD";
@@ -234,4 +237,6 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
234 QListViewItem * newItem; 237 QListViewItem * newItem;
238 if ( QFile( Vdit.current()->file()).exists() ) {
235 newItem= /*(void)*/ new QListViewItem( videoView, Vdit.current()->name(), QString::number( QFile( Vdit.current()->file()).size() ), storage); 239 newItem= /*(void)*/ new QListViewItem( videoView, Vdit.current()->name(), QString::number( QFile( Vdit.current()->file()).size() ), storage);
236 newItem->setPixmap(0, Resource::loadPixmap( "mpegplayer/videofile" )); 240 newItem->setPixmap(0, Resource::loadPixmap( "mpegplayer/videofile" ));
241 }
237 } 242 }
@@ -665,24 +670,24 @@ void PlayListWidget::tabChanged(QWidget *widg) {
665 670
666void PlayListWidget::cancelMenuTimer() { 671// void PlayListWidget::cancelMenuTimer() {
667 if( menuTimer->isActive() ) 672// if( menuTimer->isActive() )
668 menuTimer->stop(); 673// menuTimer->stop();
669} 674// }
670 675
671void PlayListWidget::showFileMenu() { 676// void PlayListWidget::showFileMenu() {
672 677
673} 678// }
674 679
675void PlayListWidget::contentsMousePressEvent( QMouseEvent * e ) 680// void PlayListWidget::contentsMousePressEvent( QMouseEvent * e )
676{ 681// {
677// QListView::contentsMousePressEvent( e ); 682// // QListView::contentsMousePressEvent( e );
678 menuTimer->start( 750, TRUE ); 683// menuTimer->start( 750, TRUE );
679} 684// }
680 685
681 686
682void PlayListWidget::contentsMouseReleaseEvent( QMouseEvent * e ) 687// void PlayListWidget::contentsMouseReleaseEvent( QMouseEvent * e )
683{ 688// {
684// QListView::contentsMouseReleaseEvent( e ); 689// // QListView::contentsMouseReleaseEvent( e );
685 menuTimer->stop(); 690// menuTimer->stop();
686} 691// }
687// void PlayListWidget::setFullScreen() { 692// // void PlayListWidget::setFullScreen() {
688// mediaPlayerState->toggleFullscreen( ); 693// mediaPlayerState->toggleFullscreen( );
diff --git a/core/multimedia/opieplayer/playlistwidget.h b/core/multimedia/opieplayer/playlistwidget.h
index 3a52dd5..6fe2211 100644
--- a/core/multimedia/opieplayer/playlistwidget.h
+++ b/core/multimedia/opieplayer/playlistwidget.h
@@ -26,3 +26,3 @@
26#include <qtabwidget.h> 26#include <qtabwidget.h>
27#include <qtimer.h> 27/* #include <qtimer.h> */
28 28
@@ -51,3 +51,3 @@ public:
51 void useSelectedDocument(); 51 void useSelectedDocument();
52 QTimer * menuTimer; 52/* QTimer * menuTimer; */
53 53
@@ -78,4 +78,4 @@ public slots:
78protected: 78protected:
79 void contentsMousePressEvent( QMouseEvent * e ); 79/* void contentsMousePressEvent( QMouseEvent * e ); */
80 void contentsMouseReleaseEvent( QMouseEvent * e ); 80/* void contentsMouseReleaseEvent( QMouseEvent * e ); */
81 81
@@ -88,4 +88,4 @@ private:
88protected slots: 88protected slots:
89 void cancelMenuTimer(); 89/* void cancelMenuTimer(); */
90 void showFileMenu(); 90/* void showFileMenu(); */
91 91