summaryrefslogtreecommitdiff
path: root/libopie2/opiemm/osoundsystem.cpp
Unidiff
Diffstat (limited to 'libopie2/opiemm/osoundsystem.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiemm/osoundsystem.cpp25
1 files changed, 23 insertions, 2 deletions
diff --git a/libopie2/opiemm/osoundsystem.cpp b/libopie2/opiemm/osoundsystem.cpp
index 13b26e6..09fd28f 100644
--- a/libopie2/opiemm/osoundsystem.cpp
+++ b/libopie2/opiemm/osoundsystem.cpp
@@ -196,3 +196,3 @@ void OMixerInterface::init()
196 { 196 {
197 owarn << "OMixerInterface::init(): Can't open mixer." << oendl; 197 owarn << "OMixerInterface::init(): Can't open mixer " << name() << oendl;
198 return; 198 return;
@@ -241,2 +241,8 @@ void OMixerInterface::init()
241 241
242 devmask = 0;
243 if ( ioctl( _fd, SOUND_MIXER_READ_STEREODEVS, &devmask ) != -1 )
244 {
245 odebug << "stereomask = " << devmask << oendl;
246 }
247
242/* ChannelIterator it; 248/* ChannelIterator it;
@@ -277,3 +283,3 @@ QStringList OMixerInterface::playChannels() const
277 283
278bool OMixerInterface::hasChannel( const QString& channel ) 284bool OMixerInterface::hasChannel( const QString& channel ) const
279{ 285{
@@ -283,2 +289,17 @@ bool OMixerInterface::hasChannel( const QString& channel )
283 289
290bool OMixerInterface::isStereo( const QString& channel ) const
291{
292 bool result = false;
293 if ( _channels.contains( channel ) )
294 {
295 int devmask = 0;
296 if ( ioctl( _fd, SOUND_MIXER_READ_STEREODEVS, &devmask ) != -1 )
297 {
298 result = devmask & ( 1 << _channels[channel] );
299 }
300 }
301 return result;
302}
303
304
284void OMixerInterface::setVolume( const QString& channel, int left, int right ) 305void OMixerInterface::setVolume( const QString& channel, int left, int right )