Skip to content

Commit

Permalink
Audio Options dialog should be using IsSameAs.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiw committed Apr 13, 2024
1 parent 69a90aa commit 0964b2b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/gui/dialogs/dlg_audiooptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit 0964b2b

Please sign in to comment.