summaryrefslogtreecommitdiffstats
path: root/kmix
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-05-21 00:53:32 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-05-25 13:24:33 +0900
commitbc9049aa6f9297a4927ec6e5720bd38276660309 (patch)
tree0d635aa624e353b8fefda80e5f76db31ba015e7c /kmix
parentb06d352d14d9d917ff23288dd6a9433e4e75f7df (diff)
downloadtdemultimedia-bc9049aa6f9297a4927ec6e5720bd38276660309.tar.gz
tdemultimedia-bc9049aa6f9297a4927ec6e5720bd38276660309.zip
KMix: fixed setMute() function on PulseAudio mixer.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
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"