How should i stop the stream inorder to make sure also the very last samples are played #2158
Unanswered
John4650-hub
asked this question in
Q&A
Replies: 1 comment
-
|
Also since iam using FIFO buffer, i tried using the write counter and the read counter as follows if (mBuff.getReadCounter() == mBuff.getWriteCounter()) {
if (current_stream_duration.load() == mDuration_secs){...} ...}I have also noticed that commenting out the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have tried using
Its like as if
setDelayBeforeCloseMillis()has no effect at all regardless which sleep time i set,Also i don't know why this is not working as i think it should. I have the current time which is frequently updated as the sound plays. I also have the total duration and i have tried to stop the stream callback when the two are equal but still the soud gets cut off around 1 - 2 seconds before it's fully played.
This called inside oboe::DataCallbackResult onAudioReady(){}
completed_ptr is just a pointer to a boolean variable which if it's true then some function is called which causes the main thread to resume and perform cleanup.
Beta Was this translation helpful? Give feedback.
All reactions