From 2251b3395ac880f0b24db47615bf21ed97ec69f3 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 12 May 2020 01:34:29 +0900 Subject: Added initial support for PulseAudio in KMix. The mixer/device channel to control from the system tray widget is now selectable from the user and default to the main one if not specifically selected. This allows to control PulseAudio volume from KMix correctly. Signed-off-by: Michele Calgaro --- kmix/mixer.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'kmix/mixer.cpp') diff --git a/kmix/mixer.cpp b/kmix/mixer.cpp index ba3bfee8..bda80910 100644 --- a/kmix/mixer.cpp +++ b/kmix/mixer.cpp @@ -383,24 +383,23 @@ void Mixer::setMasterCard(TQString& ref_id) Mixer* Mixer::masterCard() { - Mixer *mixer = 0; kdDebug(67100) << "Mixer::masterCard() searching for id=" << _masterCard << "\n"; - for (mixer=Mixer::mixers().first(); mixer!=0; mixer=Mixer::mixers().next()) + for (Mixer *mixer = Mixer::mixers().first(); mixer; mixer = Mixer::mixers().next()) { if ( mixer->id() == _masterCard ) { #ifdef MIXER_MASTER_DEBUG kdDebug(67100) << "Mixer::masterCard() found id=" << mixer->id() << "\n"; #endif - break; + return mixer; } } #ifdef MIXER_MASTER_DEBUG - if ( mixer == 0) kdDebug(67100) << "Mixer::masterCard() found no Mixer* mixer \n"; + kdDebug(67100) << "Mixer::masterCard() found no Mixer* mixer \n"; #endif - return mixer; + return NULL; } -void Mixer::setMasterCardDevice(TQString& ref_id) +void Mixer::setMasterCardDevice(const TQString &ref_id) { // The value is taken over without checking on existance. This allows the User to define // a MasterCard that is not always available (e.g. it is an USB hotplugging device). -- cgit v1.2.3