Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/common/AudioStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ AudioStream::~AudioStream() {
Result AudioStream::close() {
closePerformanceHint();
// Update local counters so they can be read after the close.
updateFramesWritten();
updateFramesRead();
// But don't update the counters if the stream is disconnected.
if (mErrorCallbackResult != Result::ErrorDisconnected) {
updateFramesWritten();
updateFramesRead();
}
return Result::OK;
}

Expand Down