summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/audiodevice.cpp
authorzecke <zecke>2003-10-07 12:53:39 (UTC)
committer zecke <zecke>2003-10-07 12:53:39 (UTC)
commite65d5c86b5fff521dfb94282a96606546bad9585 (patch) (side-by-side diff)
tree7aee07687deec9dec91031a0a7f70fc802d47c06 /core/multimedia/opieplayer/audiodevice.cpp
parent877f982ab6996b85870befffcacdef84a6700746 (diff)
downloadopie-e65d5c86b5fff521dfb94282a96606546bad9585.zip
opie-e65d5c86b5fff521dfb94282a96606546bad9585.tar.gz
opie-e65d5c86b5fff521dfb94282a96606546bad9585.tar.bz2
-Kill stupid QCOP check
-introduce OPIE_SOUND_FRAGMENT_SHIFT -USE_REALTIME_AUDIO_THREAD is now defined in custom.h
Diffstat (limited to 'core/multimedia/opieplayer/audiodevice.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiodevice.cpp37
1 files changed, 19 insertions, 18 deletions
diff --git a/core/multimedia/opieplayer/audiodevice.cpp b/core/multimedia/opieplayer/audiodevice.cpp
index 6a38fc9..d296d27 100644
--- a/core/multimedia/opieplayer/audiodevice.cpp
+++ b/core/multimedia/opieplayer/audiodevice.cpp
@@ -26,2 +26,3 @@
#include <qpe/config.h>
+#include <qpe/custom.h>
#include <qmessagebox.h>
@@ -33,4 +34,4 @@
-#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP)
-#include "qpe/qcopenvelope_qws.h"
+#if !defined(QT_NO_COP)
+#include <qpe/qcopenvelope_qws.h>
#endif
@@ -47,7 +48,7 @@
-# if defined(QT_QWS_IPAQ)
-static const int sound_fragment_shift = 14;
-# else
+#ifdef OPIE_SOUND_FRAGMENT_SHIFT
+static const int sound_fragment_shift = OPIE_SOUND_FRAGMENT_SHIFT;
+#else
static const int sound_fragment_shift = 16;
-# endif
+#endif
static const int sound_fragment_bytes = (1<<sound_fragment_shift);
@@ -147,6 +148,6 @@ void AudioDevice::setVolume( unsigned int leftVolume, unsigned int rightVolume,
//#endif
-// qDebug( "setting volume to: 0x%x", volume );
+// qDebug( "setting volume to: 0x%x", volume );
#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP)
// Send notification that the volume has changed
- QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << muted;
+ QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << muted;
#endif
@@ -158,3 +159,3 @@ 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;
@@ -174,3 +175,3 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
-
+
#ifdef KEEP_DEVICE_OPEN
@@ -189,3 +190,3 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
}
-#ifdef KEEP_DEVICE_OPEN
+#ifdef KEEP_DEVICE_OPEN
AudioDevicePrivate::dspFd = d->handle;
@@ -211,3 +212,3 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
}
-// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE;
+// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE;
@@ -217,3 +218,3 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
d->can_GETOSPACE = TRUE; // until we find otherwise
-
+
//if ( chs != d->channels ) qDebug( "Wanted %d, got %d channels", chs, d->channels );
@@ -224,5 +225,5 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
//if ( capabilities & DSP_CAP_MMAP ) qDebug( "Sound card can mmap" );
-
+
}
-
+
@@ -231,4 +232,4 @@ AudioDevice::~AudioDevice() {
// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE;
-
-# ifndef KEEP_DEVICE_OPEN
+
+# ifndef KEEP_DEVICE_OPEN
close( d->handle ); // Now it should be safe to shut the handle
@@ -238,3 +239,3 @@ AudioDevice::~AudioDevice() {
// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE;
-
+
}