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
Describe the bug
In my Android app I'm trying to use audioPlayer.openPCM16AudioInMemory to play audio from memory. After opening the audio in memory I want to edit the memory 'in place' while I expect the audioPlayer to always play whatever is in memory. This almost works, though it seems that the start point is cached in the audioPlayer and I can't see a way to clear this cached point.
Playing around with loopBetween, making sure it's start point is outside of the cached memory, seems to work. But this is not something I can use as it is not a very reliable fix.
Steps to Reproduce
Basically I do this:
audioPlayer.openPCM16AudioInMemory(workingAudioBuffer, sampleRate, durationInFrames);
audioPlayer.loopBetween(0, duration)
// The audio is playing
// At some point I do this:
std::copy(newAudioBuffer,
newAudioBuffer + (duration * numberOfChannels),
workingAudioBuffer);
// I expect the audioPlayer to play the new audio. But instead it plays ~1 second of 'old' audio and then the new audio.
Let me know if you would like an edited example project.
The text was updated successfully, but these errors were encountered:
I was also trying to call openPCM16AudioInMemory again after changing the audio in memory. But I think the audioPlayer takes ownership over the memory so it gets freed after calling openPCM16AudioInMemory again. So opening the same memory location would cause problems. Correct me if I'm wrong.
Could this work with using the AudioInMemory class with a positive retain count? Is this something you would recommend?
Superpowered version: 2.6.2 (d67e895)
Describe the bug
In my Android app I'm trying to use
audioPlayer.openPCM16AudioInMemory
to play audio from memory. After opening the audio in memory I want to edit the memory 'in place' while I expect the audioPlayer to always play whatever is in memory. This almost works, though it seems that the start point is cached in the audioPlayer and I can't see a way to clear this cached point.Playing around with
loopBetween
, making sure it's start point is outside of the cached memory, seems to work. But this is not something I can use as it is not a very reliable fix.Steps to Reproduce
Basically I do this:
Let me know if you would like an edited example project.
The text was updated successfully, but these errors were encountered: