Skip to content

Commit 0091d27

Browse files
committed
MemoryStream setAvailable
1 parent 1ac269f commit 0091d27

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/AudioTools/CoreAudio/AudioStreams.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,16 @@ class MemoryStream : public AudioStream {
281281
return buffer != nullptr;
282282
}
283283

284+
/// Provides access to the data array
284285
virtual uint8_t* data(){
285286
return buffer;
286287
}
287288

289+
/// update the write_pos (e.g. when we used data() to update the array)
290+
virtual void setAvailable(size_t len) {
291+
this->write_pos = len;
292+
}
293+
288294
/// Callback which is executed when we rewind (in loop mode) to the beginning
289295
void setRewindCallback(void (*cb)()){
290296
this->rewind = cb;

0 commit comments

Comments
 (0)