You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to audio programming and C++. I've managed to Integrate Oboe and libsndfile into a Flutter app where I can monitor the microphone (Oboe LiveEffect) and save the output into a wav file.
I would like to play a sound file when monitoring the microphone.
What is the high level approach for playing a sound file (backing track) so that one can hear the sound file as well as monitor the mic at the same time without creating another audio stream?
This is my thinking, using LiveEffect as an example: Would it mean having a
recordStream, playbackStream
load backingTrack sound file into a buffer, open playback, open record stream
in the DataCallbackResult::onBothStreamsReady, mix the backingTrack buffer into the output stream where the input stream is being copied to the output stream?
for (int32_t i = 0; i < samplesToProcess; i++) {
*outputFloats++ = *inputFloats++ // somehow mix the backingTrack Buffer to output
}
Does this makes sense on a high level? Are there any tools available to do this type of mixing?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm new to audio programming and C++. I've managed to Integrate Oboe and libsndfile into a Flutter app where I can monitor the microphone (Oboe LiveEffect) and save the output into a wav file.
I would like to play a sound file when monitoring the microphone.
What is the high level approach for playing a sound file (backing track) so that one can hear the sound file as well as monitor the mic at the same time without creating another audio stream?
This is my thinking, using LiveEffect as an example: Would it mean having a
Does this makes sense on a high level? Are there any tools available to do this type of mixing?
Beta Was this translation helpful? Give feedback.
All reactions