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

Could someone provide an example for using RtAudioErrorCallback in constructor? #414

Open
mjsmithers opened this issue Oct 19, 2023 · 0 comments

Comments

@mjsmithers
Copy link

I'm trying to move from RtAudio 5 to 6 and I can't figure out how to use the constructor with RtAudioErrorCallback.
RtAudio( RtAudio::Api api=UNSPECIFIED, RtAudioErrorCallback&& errorCallback=0 );

In RtAudio 5, I have

RtAudio * p = new RtAudio(RtAudio::WINDOWS_ASIO);
catch (RtAudioError &error) {
// report error here
}

but in RtAudio 6 I keep getting compile errors trying to do something like

RtAudioErrorCallback errorCallback;
RtAudio * p = new RtAudio(RtAudio::MACOSX_CORE, errorCallback);

What should the code look like to use RtAudioErrorCallback?

Thanks,
Michael

@mjsmithers mjsmithers changed the title Please provide example for using RtAudioErrorCallback in constructor Could someone provide an example for using RtAudioErrorCallback in constructor? Oct 19, 2023
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

No branches or pull requests

1 participant