Skip to content

Commit

Permalink
MeasuringStream
Browse files Browse the repository at this point in the history
  • Loading branch information
pschatzmann committed Jan 11, 2025
1 parent c180443 commit 47854d9
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 @@ -792,6 +792,12 @@ class MeasuringStream : public ModifyingStream {
return estimatedTotalTimeFor(totalBytes) -timeSinceBegin();
}

/// Alternative update method: e.g report actual file positon
void setProcessedBytes(uint32_t pos) {
if (pos < total_bytes_since_begin) begin();
total_bytes_since_begin = pos;
}

protected:
int max_count=0;
int count=0;
Expand Down

0 comments on commit 47854d9

Please sign in to comment.