Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asio probe infinite-loop fix. #393

Merged
merged 1 commit into from Apr 3, 2023
Merged

Conversation

dbadb
Copy link
Contributor

@dbadb dbadb commented Apr 1, 2023

The problem: when my ASIO device is unplugged (driver still installed), deviceProbe finds no devices which results in an infinite loop when RtApiAsio :: probeDevices invokes getDefaultInputDevice() - which re-invokes RtApiAsio :: probeDevices. This problem can be reproduced by running the standard audioprobe test.

In this condition probeDeviceInfo( info ) == false around line 3406.

I'm not claiming that my fix is the best fix but have verified that it unclogs the logjam.

@garyscavone
Copy link
Contributor

I see extraneous code and comments (not currently in the master branch) from an earlier attempt to fix the issue. I understand the fix to the problem is to only call the "getDefaultXXDevice()" functions if the size of deviceList_ > 0?

@dbadb
Copy link
Contributor Author

dbadb commented Apr 2, 2023

indeed, this is the heart of it:

if(deviceList_.size() > 0)
  {
    getDefaultInputDevice();
    getDefaultOutputDevice();
  }

@dbadb
Copy link
Contributor Author

dbadb commented Apr 2, 2023

This was an attempt to squash the multi-step revision to reduce noise of extraneous changes.
(git rebase newbie here)

@garyscavone garyscavone merged commit 3a60c27 into thestk:master Apr 3, 2023
12 checks passed
@marcelblum
Copy link

thank you so much for this, was driving me nuts 🥲

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants