summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiodevice.cpp4
-rw-r--r--core/multimedia/opieplayer/audiowidget.cpp18
2 files changed, 11 insertions, 11 deletions
diff --git a/core/multimedia/opieplayer/audiodevice.cpp b/core/multimedia/opieplayer/audiodevice.cpp
index 59e06a6..abbe5c8 100644
--- a/core/multimedia/opieplayer/audiodevice.cpp
+++ b/core/multimedia/opieplayer/audiodevice.cpp
@@ -190,13 +190,13 @@ void AudioDevice::setVolume( unsigned int leftVolume, unsigned int rightVolume,
AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
qDebug("creating new audio device");
- // QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE;
+// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE;
d = new AudioDevicePrivate;
d->frequency = f;
d->channels = chs;
d->bytesPerSample = bps;
qDebug("%d",bps);
int format=0;
@@ -242,25 +242,25 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
qDebug("channels %d",d->channels);
if ( ioctl( d->handle, SNDCTL_DSP_CHANNELS, &d->channels ) == -1 ) {
d->channels = ( d->channels == 1 ) ? 2 : d->channels;
if(ioctl( d->handle, SNDCTL_DSP_CHANNELS, &d->channels )==-1)
perror("ioctl(\"SNDCTL_DSP_CHANNELS\")");
}
+// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE;
d->bufferSize = sound_fragment_bytes;
d->unwrittenBuffer = new char[d->bufferSize];
d->unwritten = 0;
d->can_GETOSPACE = TRUE; // until we find otherwise
//if ( chs != d->channels ) qDebug( "Wanted %d, got %d channels", chs, d->channels );
//if ( f != d->frequency ) qDebug( "wanted %dHz, got %dHz", f, d->frequency );
//if ( capabilities & DSP_CAP_BATCH ) qDebug( "Sound card has local buffer" );
//if ( capabilities & DSP_CAP_REALTIME )qDebug( "Sound card has realtime sync" );
//if ( capabilities & DSP_CAP_TRIGGER ) qDebug( "Sound card has precise trigger" );
//if ( capabilities & DSP_CAP_MMAP ) qDebug( "Sound card can mmap" );
- // QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE;
}
AudioDevice::~AudioDevice() {
qDebug("destryo audiodevice");
diff --git a/core/multimedia/opieplayer/audiowidget.cpp b/core/multimedia/opieplayer/audiowidget.cpp
index 54e7ceb..b96b1ef 100644
--- a/core/multimedia/opieplayer/audiowidget.cpp
+++ b/core/multimedia/opieplayer/audiowidget.cpp
@@ -73,19 +73,19 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
// layout->setMargin( 2);
QString backgroundPix, buttonsAllPix, buttonsBigPix, controlsPix, animatedPix;
backgroundPix=cfg.readEntry( " backgroundPix", "opieplayer/metalFinish");
buttonsAllPix=cfg.readEntry( "buttonsAllPix","opieplayer/mediaButtonsAll");
buttonsBigPix=cfg.readEntry( "buttonsBigPix","opieplayer/mediaButtonsBig");
controlsPix=cfg.readEntry( "controlsPix","opieplayer/mediaControls");
- animatedPix=cfg.readEntry( "animatedPix", "opieplayer/animatedButton");
+// animatedPix=cfg.readEntry( "animatedPix", "opieplayer/animatedButton");
setBackgroundPixmap( Resource::loadPixmap( backgroundPix) );
pixmaps[0] = new QPixmap( Resource::loadPixmap( buttonsAllPix ) );
pixmaps[1] = new QPixmap( Resource::loadPixmap( buttonsBigPix ) );
pixmaps[2] = new QPixmap( Resource::loadPixmap( controlsPix ) );
- pixmaps[3] = new QPixmap( Resource::loadPixmap( animatedPix) );
+// pixmaps[3] = new QPixmap( Resource::loadPixmap( animatedPix) );
songInfo = new Ticker( this );
songInfo->setFocusPolicy( QWidget::NoFocus );
songInfo->setGeometry( QRect( 7, 3, 220, 20 ) );
// layout->addMultiCellWidget( songInfo, 0, 0, 0, 2 );
@@ -117,13 +117,13 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
}
AudioWidget::~AudioWidget() {
mediaPlayerState->isStreaming = FALSE;
- for ( int i = 0; i < 4; i++ )
+ for ( int i = 0; i < 3; i++ )
delete pixmaps[i];
}
static bool audioSliderBeingMoved = FALSE;
@@ -217,18 +217,18 @@ void AudioWidget::paintButton( QPainter *p, int i ) {
void AudioWidget::timerEvent( QTimerEvent * ) {
static int frame = 0;
if ( !mediaPlayerState->paused() && audioButtons[ AudioPlay ].isDown ) {
frame = frame >= 7 ? 0 : frame + 1;
- int x = audioButtons[AudioPlay].xPos;
- int y = audioButtons[AudioPlay].yPos;
- QPainter p( this );
- // Optimize to only draw the little bit of the changing images which is different
- p.drawPixmap( x + 14, y + 8, *pixmaps[3], 32 * frame, 0, 32, 32 );
- p.drawPixmap( x + 37, y + 37, *pixmaps[2], 18 * AudioPlay, 0, 6, 3 );
+// int x = audioButtons[AudioPlay].xPos;
+// int y = audioButtons[AudioPlay].yPos;
+// QPainter p( this );
+// // Optimize to only draw the little bit of the changing images which is different
+// p.drawPixmap( x + 14, y + 8, *pixmaps[3], 32 * frame, 0, 32, 32 );
+// p.drawPixmap( x + 37, y + 37, *pixmaps[2], 18 * AudioPlay, 0, 6, 3 );
}
}
void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
for ( int i = 0; i < numButtons; i++ ) {