author | schurig <schurig> | 2003-06-14 06:05:13 (UTC) |
---|---|---|
committer | schurig <schurig> | 2003-06-14 06:05:13 (UTC) |
commit | 6b57a9fbe9f56e6af3911ea9337872c468b614b5 (patch) (side-by-side diff) | |
tree | 69ef7f20babceda2ba3ee8138cbd29bdd8587f46 /core/multimedia/opieplayer/audiodevice.cpp | |
parent | bbb4e35556d1d1a759dbe99bc155ecfc45e49c1b (diff) | |
download | opie-6b57a9fbe9f56e6af3911ea9337872c468b614b5.zip opie-6b57a9fbe9f56e6af3911ea9337872c468b614b5.tar.gz opie-6b57a9fbe9f56e6af3911ea9337872c468b614b5.tar.bz2 |
Adaptions for QT_QWS_DEVFS
Diffstat (limited to 'core/multimedia/opieplayer/audiodevice.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/audiodevice.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/core/multimedia/opieplayer/audiodevice.cpp b/core/multimedia/opieplayer/audiodevice.cpp index d01d2ba..6a38fc9 100644 --- a/core/multimedia/opieplayer/audiodevice.cpp +++ b/core/multimedia/opieplayer/audiodevice.cpp @@ -93,3 +93,7 @@ void AudioDevice::getVolume( unsigned int& leftVolume, unsigned int& rightVolume unsigned int volume; +#ifdef QT_QWS_DEVFS + int mixerHandle = open( "/dev/sound/mixer", O_RDWR ); +#else int mixerHandle = open( "/dev/mixer", O_RDWR ); +#endif if ( mixerHandle >= 0 ) { @@ -123,3 +127,7 @@ void AudioDevice::setVolume( unsigned int leftVolume, unsigned int rightVolume, int mixerHandle = 0; +#ifdef QT_QWS_DEVFS + if ( ( mixerHandle = open( "/dev/sound/mixer", O_RDWR ) ) >= 0 ) { +#else if ( ( mixerHandle = open( "/dev/mixer", O_RDWR ) ) >= 0 ) { +#endif if(ioctl( mixerHandle, MIXER_WRITE(0), &volume ) ==-1) @@ -170,5 +178,8 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) { #endif +#ifdef QT_QWS_DEVFS + if ( ( d->handle = ::open( "/dev/sound/dsp", O_WRONLY ) ) < 0 ) { +#else if ( ( d->handle = ::open( "/dev/dsp", O_WRONLY ) ) < 0 ) { +#endif -// perror("open(\"/dev/dsp\") sending to /dev/null instead"); perror("open(\"/dev/dsp\")"); @@ -177,4 +188,2 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) { exit(-1); //harsh? -// d->handle = ::open( "/dev/null", O_WRONLY ); - // WTF?!?! } |