-
Notifications
You must be signed in to change notification settings - Fork 322
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
Can't open RtAudio
object from a different thread
#374
Comments
I tried this on OS-X and it worked fine. I don't know if it may be an issue with the ASIO API or the configuration on your particular computer. |
Ah forgot to add I am not of macos but on windows 11. |
Does it work from same thread? |
@sonoro1234 Yes it does indeed. If my main function in the minimal example above looks like the following everything works as expected and no errors are printed. int main()
{
using namespace std::chrono_literals;
threadFunction();
std::this_thread::sleep_for(3s);
audioOutputStream.closeStream();
} |
The first example worked for me in Mac OS-X but not in Windows ASIO. I see in the RtApiAsio constructor that it says: |
Alright, if it is a limitation of the windows ASIO API, then it would be great if you could add a description of the behaviour to the documentation. I couldn't find anything about it anywhere here: https://www.music.mcgill.ca/~gary/rtaudio/ |
Hello!
I think I found a bug in
RtAudio
, although I am not sure and it might just be undocumented behaviour.If I instanciate a
RtAudio
object in one thread and then callopenStream
on that object from another thread, the connection to the sound card can not be established. I did not read read anywhere that this is not possible, so I am assuming it might be bug. The output I am getting with the following minimal example is:Does anybody have an idea how to fix this? Thank you some much in advance!
Minimal example:
The text was updated successfully, but these errors were encountered: