A set of C++ classes that provide a common API for realtime audio input/output across Linux (native ALSA, JACK, PulseAudio and OSS), Macintosh OS X (CoreAudio and JACK), and Windows (DirectSound, ASIO, and WASAPI) operating systems.
Other
1.49k
stars
317
forks
source link
Could someone provide an example for using RtAudioErrorCallback in constructor? #414
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?
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