Thanks for that suggestion. I did a few tests and worked out that mine is not a scope issue. It might be something to do with the way I am reading the base64 back in again. I managed to deduce that there are some differences in the number of samples that I am sending to base64 and the number that come back.
For an audio signal ~20ms in length, at a sample rate of 96,000 I have 1977 samples going into the base64. When I read these out of the base64 I am getting 1152 in. I have included a snippet of code that reads the exact same base64 value in… I can only think that there must be something wrong with my reader code - if anyone can confirm that would be great?
MemoryInputStream* inStream = new MemoryInputStream(memoryBlock.getData(), memoryBlock.getSize(),true);
// Read audio into buffer
if (auto* reader = format.createReaderFor(inStream, true) )
AudioFormatReaderSource* p_inputSource = new AudioFormatReaderSource (reader, true);
int sampleCount = (int)p_inputSource->getTotalLength();
And when I use an audio signal that is ~10ms long, I get 1017 samples, however when I try an read in using the above method I get a sampleCount of 0. It seems to be losing samples?