diff --git a/src/AudioTools/CoreAudio/AudioStreams.h b/src/AudioTools/CoreAudio/AudioStreams.h index 122c9c8ca..584b688f1 100644 --- a/src/AudioTools/CoreAudio/AudioStreams.h +++ b/src/AudioTools/CoreAudio/AudioStreams.h @@ -281,10 +281,16 @@ class MemoryStream : public AudioStream { return buffer != nullptr; } + /// Provides access to the data array virtual uint8_t* data(){ return buffer; } + /// update the write_pos (e.g. when we used data() to update the array) + virtual void setAvailable(size_t len) { + this->write_pos = len; + } + /// Callback which is executed when we rewind (in loop mode) to the beginning void setRewindCallback(void (*cb)()){ this->rewind = cb;