Skip to content

Commit

Permalink
MemoryStream setAvailable
Browse files Browse the repository at this point in the history
  • Loading branch information
pschatzmann committed Dec 10, 2024
1 parent 1ac269f commit 0091d27
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/AudioTools/CoreAudio/AudioStreams.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0091d27

Please sign in to comment.