204c2ca7cb
Copy from multimedia:apps/audacity based on submit request 24166 from user mseben OBS-URL: https://build.opensuse.org/request/show/24166 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/audacity?expand=0&rev=23
46 lines
1.7 KiB
Diff
46 lines
1.7 KiB
Diff
Index: audacity-src-1.3.9/src/prefs/DevicePrefs.cpp
|
|
===================================================================
|
|
--- audacity-src-1.3.9.orig/src/prefs/DevicePrefs.cpp
|
|
+++ audacity-src-1.3.9/src/prefs/DevicePrefs.cpp
|
|
@@ -173,6 +173,16 @@ void DevicePrefs::OnHost(wxCommandEvent
|
|
wxArrayString playnames;
|
|
wxArrayString recordnames;
|
|
|
|
+ int playDeviceNum = -1; // use device name from gPrefs
|
|
+ if ( mPlayDevice == wxT("") ) {
|
|
+ playDeviceNum = Pa_GetDefaultOutputDevice();
|
|
+ }
|
|
+ int recDeviceNum = -1; // use device name from gPrefs
|
|
+ if ( mRecordDevice == wxT("") ) {
|
|
+ recDeviceNum = Pa_GetDefaultInputDevice();
|
|
+ }
|
|
+
|
|
+
|
|
int devindex; /* temp variable to hold the numeric ID of each device in turn */
|
|
|
|
for (int i = 0; i < nDevices; i++) {
|
|
@@ -185,7 +195,10 @@ void DevicePrefs::OnHost(wxCommandEvent
|
|
if (info->maxOutputChannels > 0) {
|
|
playnames.Add(name);
|
|
devindex = mPlay->Append(name, (void *) info);
|
|
- if (device == mPlayDevice) { /* if this is the default device, select it */
|
|
+ if (playDeviceNum == i) {
|
|
+ mPlay->SetSelection(index);
|
|
+ }
|
|
+ else if (device == mPlayDevice) {
|
|
mPlay->SetSelection(devindex);
|
|
}
|
|
}
|
|
@@ -193,7 +206,10 @@ void DevicePrefs::OnHost(wxCommandEvent
|
|
if (info->maxInputChannels > 0) {
|
|
recordnames.Add(name);
|
|
devindex = mRecord->Append(name, (void *) info);
|
|
- if (device == mRecordDevice) {
|
|
+ if (recDeviceNum == i) {
|
|
+ mRecord->SetSelection(index);
|
|
+ }
|
|
+ else if (device == mRecordDevice) {
|
|
mRecord->SetSelection(devindex);
|
|
}
|
|
}
|