author | schurig <schurig> | 2003-06-14 06:05:13 (UTC) |
---|---|---|
committer | schurig <schurig> | 2003-06-14 06:05:13 (UTC) |
commit | 6b57a9fbe9f56e6af3911ea9337872c468b614b5 (patch) (unidiff) | |
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) (ignore 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 | |||
93 | unsigned int volume; | 93 | unsigned int volume; |
94 | #ifdef QT_QWS_DEVFS | ||
95 | int mixerHandle = open( "/dev/sound/mixer", O_RDWR ); | ||
96 | #else | ||
94 | int mixerHandle = open( "/dev/mixer", O_RDWR ); | 97 | int mixerHandle = open( "/dev/mixer", O_RDWR ); |
98 | #endif | ||
95 | if ( mixerHandle >= 0 ) { | 99 | if ( mixerHandle >= 0 ) { |
@@ -123,3 +127,7 @@ void AudioDevice::setVolume( unsigned int leftVolume, unsigned int rightVolume, | |||
123 | int mixerHandle = 0; | 127 | int mixerHandle = 0; |
128 | #ifdef QT_QWS_DEVFS | ||
129 | if ( ( mixerHandle = open( "/dev/sound/mixer", O_RDWR ) ) >= 0 ) { | ||
130 | #else | ||
124 | if ( ( mixerHandle = open( "/dev/mixer", O_RDWR ) ) >= 0 ) { | 131 | if ( ( mixerHandle = open( "/dev/mixer", O_RDWR ) ) >= 0 ) { |
132 | #endif | ||
125 | if(ioctl( mixerHandle, MIXER_WRITE(0), &volume ) ==-1) | 133 | if(ioctl( mixerHandle, MIXER_WRITE(0), &volume ) ==-1) |
@@ -170,5 +178,8 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) { | |||
170 | #endif | 178 | #endif |
179 | #ifdef QT_QWS_DEVFS | ||
180 | if ( ( d->handle = ::open( "/dev/sound/dsp", O_WRONLY ) ) < 0 ) { | ||
181 | #else | ||
171 | if ( ( d->handle = ::open( "/dev/dsp", O_WRONLY ) ) < 0 ) { | 182 | if ( ( d->handle = ::open( "/dev/dsp", O_WRONLY ) ) < 0 ) { |
183 | #endif | ||
172 | 184 | ||
173 | // perror("open(\"/dev/dsp\") sending to /dev/null instead"); | ||
174 | perror("open(\"/dev/dsp\")"); | 185 | perror("open(\"/dev/dsp\")"); |
@@ -177,4 +188,2 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) { | |||
177 | exit(-1); //harsh? | 188 | exit(-1); //harsh? |
178 | // d->handle = ::open( "/dev/null", O_WRONLY ); | ||
179 | // WTF?!?! | ||
180 | } | 189 | } |