From 0964b2b26a449075296adc712180f5f70362eff3 Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Sat, 13 Apr 2024 13:55:56 -0700 Subject: [PATCH] Audio Options dialog should be using IsSameAs. --- src/gui/dialogs/dlg_audiooptions.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/dialogs/dlg_audiooptions.cpp b/src/gui/dialogs/dlg_audiooptions.cpp index 785ad0605..f196f7239 100644 --- a/src/gui/dialogs/dlg_audiooptions.cpp +++ b/src/gui/dialogs/dlg_audiooptions.cpp @@ -399,7 +399,7 @@ bool AudioOptsDialog::setTextCtrlIfDevNameValid(wxTextCtrl *textCtrl, wxListCtrl // ignore last list entry as it is the "none" entry for(int i = 0; i < listCtrl->GetItemCount() - 1; i++) { - if (listCtrl->GetItemText(i, 0).Find(devName) == 0) + if (listCtrl->GetItemText(i, 0).IsSameAs(devName)) { textCtrl->SetValue(listCtrl->GetItemText(i, 0)); if (g_verbose) fprintf(stderr,"setting focus of %d\n", i); @@ -638,7 +638,7 @@ int AudioOptsDialog::buildListOfSupportedSampleRates(wxComboBox *cbSampleRate, w cbSampleRate->Clear(); for (auto& dev : deviceList) { - if (dev.name.Find(devName) == 0) + if (dev.name.IsSameAs(devName)) { auto supportedSampleRates = engine->getSupportedSampleRates( @@ -853,7 +853,7 @@ void AudioOptsDialog::plotDeviceInputForAFewSecs(wxString devName, PlotScalar *p auto devList = engine->getAudioDeviceList(IAudioEngine::AUDIO_ENGINE_IN); for (auto& devInfo : devList) { - if (devInfo.name.Find(devName) == 0) + if (devInfo.name.IsSameAs(devName)) { int sampleCount = 0; int sampleRate = wxAtoi(m_cbSampleRateRxIn->GetValue()); @@ -978,7 +978,7 @@ void AudioOptsDialog::plotDeviceOutputForAFewSecs(wxString devName, PlotScalar * auto devList = engine->getAudioDeviceList(IAudioEngine::AUDIO_ENGINE_OUT); for (auto& devInfo : devList) { - if (devInfo.name.Find(devName) == 0) + if (devInfo.name.IsSameAs(devName)) { int sampleCount = 0; int sampleRate = wxAtoi(m_cbSampleRateRxIn->GetValue());