Skip to content

Commit

Permalink
[FIX] Incorrect rtaudio evolution in 0feec30.
Browse files Browse the repository at this point in the history
  • Loading branch information
sletz committed Dec 27, 2023
1 parent c812aa7 commit ea4eeb6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions architecture/faust/audio/rtaudio-dsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class rtaudio : public audio {
fAudioDAC.closeStream();
} catch (RtAudioError& e) {
std::cout << '\n' << e.getMessage() << '\n' << std::endl;
}
#else
RtAudioErrorType err = fAudioDAC.stopStream();
if (err != RTAUDIO_NO_ERROR) {
Expand Down Expand Up @@ -149,17 +150,20 @@ class rtaudio : public audio {
fSampleRate, &fBufferSize, audioCallback, this, &options);
} catch (RtAudioError& e) {
std::cout << '\n' << e.getMessage() << '\n' << std::endl;
return false;
}
return true;
#else
RtAudioErrorType err = fAudioDAC.openStream(
((numOutputs > 0) ? &oParams : NULL),
((numInputs > 0) ? &iParams : NULL), FORMAT,
fSampleRate, &fBufferSize, audioCallback, this, &options);
if (err != RTAUDIO_NO_ERROR) {
std::cout << '\n' << fAudioDAC.getErrorText() << '\n' << std::endl;
#endif
return false;
}
return true;
#endif
}

void setDsp(dsp* DSP)
Expand All @@ -183,14 +187,17 @@ class rtaudio : public audio {
fAudioDAC.startStream();
} catch (RtAudioError& e) {
std::cout << '\n' << e.getMessage() << '\n' << std::endl;
return false;
}
return true;
#else
RtAudioErrorType err = fAudioDAC.startStream();
if (err != RTAUDIO_NO_ERROR) {
std::cout << '\n' << fAudioDAC.getErrorText() << '\n' << std::endl;
#endif
return false;
}
return true;
#endif
}

virtual void stop()
Expand Down

0 comments on commit ea4eeb6

Please sign in to comment.