mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-16 08:34:10 +02:00
fix initial input channel number combo population on fresh start without audacity.cfg (could not replicate so did not test)
This commit is contained in:
parent
4511331f88
commit
efb6f2e584
@ -619,15 +619,25 @@ void DeviceToolBar::FillHostDevices()
|
|||||||
// Repopulate the Input/Output device list available to the user
|
// Repopulate the Input/Output device list available to the user
|
||||||
mInput->Clear();
|
mInput->Clear();
|
||||||
for (i = 0; i < mInputDeviceSourceMaps.size(); i++) {
|
for (i = 0; i < mInputDeviceSourceMaps.size(); i++) {
|
||||||
if (foundHostIndex == mInputDeviceSourceMaps[i].hostIndex)
|
if (foundHostIndex == mInputDeviceSourceMaps[i].hostIndex) {
|
||||||
mInput->Append(MakeDeviceSourceString(&mInputDeviceSourceMaps[i]));
|
mInput->Append(MakeDeviceSourceString(&mInputDeviceSourceMaps[i]));
|
||||||
|
if (host == wxT("")) {
|
||||||
|
host = mInputDeviceSourceMaps[i].hostString;
|
||||||
|
gPrefs->Write(wxT("/AudioIO/Host"), host);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
mInput->Enable(mInput->GetCount() ? true : false);
|
mInput->Enable(mInput->GetCount() ? true : false);
|
||||||
|
|
||||||
mOutput->Clear();
|
mOutput->Clear();
|
||||||
for (i = 0; i < mOutputDeviceSourceMaps.size(); i++) {
|
for (i = 0; i < mOutputDeviceSourceMaps.size(); i++) {
|
||||||
if (foundHostIndex == mOutputDeviceSourceMaps[i].hostIndex)
|
if (foundHostIndex == mOutputDeviceSourceMaps[i].hostIndex) {
|
||||||
mOutput->Append(MakeDeviceSourceString(&mOutputDeviceSourceMaps[i]));
|
mOutput->Append(MakeDeviceSourceString(&mOutputDeviceSourceMaps[i]));
|
||||||
|
if (host == wxT("")) {
|
||||||
|
host = mInputDeviceSourceMaps[i].hostString;
|
||||||
|
gPrefs->Write(wxT("/AudioIO/Host"), host);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
mOutput->Enable(mOutput->GetCount() ? true : false);
|
mOutput->Enable(mOutput->GetCount() ? true : false);
|
||||||
|
|
||||||
@ -707,19 +717,21 @@ void DeviceToolBar::SetDevices(DeviceSourceMap *in, DeviceSourceMap *out)
|
|||||||
if (in) {
|
if (in) {
|
||||||
gPrefs->Write(wxT("/AudioIO/RecordingDevice"), in->deviceString);
|
gPrefs->Write(wxT("/AudioIO/RecordingDevice"), in->deviceString);
|
||||||
gPrefs->Write(wxT("/AudioIO/RecordingSourceIndex"), in->sourceIndex);
|
gPrefs->Write(wxT("/AudioIO/RecordingSourceIndex"), in->sourceIndex);
|
||||||
if (in->sourceIndex >= 0) {
|
if (in->totalSources >= 1) {
|
||||||
gPrefs->Write(wxT("/AudioIO/RecordingSource"), in->sourceString);
|
gPrefs->Write(wxT("/AudioIO/RecordingSource"), in->sourceString);
|
||||||
} else
|
} else {
|
||||||
gPrefs->Write(wxT("/AudioIO/RecordingSource"), wxT(""));
|
gPrefs->Write(wxT("/AudioIO/RecordingSource"), wxT(""));
|
||||||
|
}
|
||||||
FillInputChannels();
|
FillInputChannels();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (out) {
|
if (out) {
|
||||||
gPrefs->Write(wxT("/AudioIO/PlaybackDevice"), out->deviceString);
|
gPrefs->Write(wxT("/AudioIO/PlaybackDevice"), out->deviceString);
|
||||||
if (out->sourceIndex >= 0) {
|
if (out->totalSources >= 1) {
|
||||||
gPrefs->Write(wxT("/AudioIO/PlaybackSource"), out->sourceString);
|
gPrefs->Write(wxT("/AudioIO/PlaybackSource"), out->sourceString);
|
||||||
} else
|
} else {
|
||||||
gPrefs->Write(wxT("/AudioIO/PlaybackSource"), wxT(""));
|
gPrefs->Write(wxT("/AudioIO/PlaybackSource"), wxT(""));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user