summaryrefslogtreecommitdiffstats
path: root/kmix
diff options
context:
space:
mode:
Diffstat (limited to 'kmix')
-rw-r--r--kmix/mixer.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/kmix/mixer.cpp b/kmix/mixer.cpp
index 0cc4fbcf..d8e93fc4 100644
--- a/kmix/mixer.cpp
+++ b/kmix/mixer.cpp
@@ -684,22 +684,25 @@ void Mixer::decreaseVolume(int deviceidx, int percentage)
}
// @dcop
-void Mixer::setMute( int deviceidx, bool on )
+void Mixer::setMute(int deviceidx, bool on)
{
- MixDevice *mixdev= mixDeviceByType( deviceidx );
- if (!mixdev) return;
-
- mixdev->setMuted( on );
+ MixDevice *mixdev= mixDeviceByType(deviceidx);
+ if (!mixdev)
+ {
+ return;
+ }
- _mixerBackend->writeVolumeToHW(deviceidx, mixdev->getVolume() );
+ mixdev->setMuted(on);
+ commitVolumeChange(mixdev);
}
// @dcop only
-void Mixer::setMasterMute( bool on )
+void Mixer::setMasterMute(bool on)
{
- MixDevice *master = masterDevice();
- if (master != 0 ) {
- setMute( master->num(), on );
+ MixDevice *md = masterDevice();
+ if (md)
+ {
+ setMute(md->num(), on);
}
}
@@ -757,10 +760,10 @@ bool Mixer::isRecordSource( int deviceidx )
return mixdev->isRecSource();
}
-/// @DCOP WHAT DOES THIS METHOD?!?!?
+// @dcop
bool Mixer::isAvailableDevice( int deviceidx )
{
- return mixDeviceByType( deviceidx );
+ return (mixDeviceByType(deviceidx) != NULL);
}
#include "mixer.moc"