Bug 301887 - MixDevice::readPlaybackOrCapture appends 'Capture' twice
Summary: MixDevice::readPlaybackOrCapture appends 'Capture' twice
Status: RESOLVED FIXED
Alias: None
Product: kmix
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Christian Esken
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-14 08:55 UTC by John Stanley
Modified: 2012-08-04 20:59 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Stanley 2012-06-14 08:55:51 UTC
In method MixDevice::readPlaybackOrCapture we have the code (kdemultimedia-4.8.4.new/kmix/core/mixdevice.cpp):

293       QString volstr = getVolString(chid,capture);
294        if ( capture ) volstr += "Capture";

but in method  QString MixDevice::getVolString, "Capture" is already appended if needed:
 
336 QString MixDevice::getVolString(Volume::ChannelID chid, bool capture)
337 {
338        QString volstr (Volume::ChannelNameForPersistence[chid]);
339        if ( capture ) volstr += "Capture";
340        return volstr;
341 }

so, line 294 is not needed and causes problems by appending "Capture" twice.

Reproducible: Always

Steps to Reproduce:
1. See Details
2.
3.
Actual Results:  
See Fetails

Expected Results:  
See Details
Comment 1 Christian Esken 2012-07-03 21:39:34 UTC
This means in effect that capture volumes will not be restored. This bug must be fixed for KDE4.9.
Comment 2 Christian Esken 2012-07-03 22:12:27 UTC
Git commit 1137eacf33158b55f8361d2f2ccf8ea0f0d478e7 by Christian Esken.
Committed on 04/07/2012 at 00:08.
Pushed by esken into branch 'master'.

Fix restore of capture volumes

M  +0    -1    core/mixdevice.cpp

http://commits.kde.org/kmix/1137eacf33158b55f8361d2f2ccf8ea0f0d478e7
Comment 3 Christian Esken 2012-08-04 20:59:47 UTC
Forgot to close ticket. It is fixed in trunk and 4.9 branch.