summaryrefslogtreecommitdiff
path: root/src/audio_core/stream.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-01-28 21:54:46 -0800
committerGitHub <noreply@github.com>2021-01-28 21:54:46 -0800
commitb786568c5ae056f2d55854959029e72e58d62990 (patch)
treeccc2f2069e0d53e72d3f717b7598c2ae99e17d09 /src/audio_core/stream.cpp
parentdf41e78205b6c3e212674a274bf1d4b0ed002a0c (diff)
parentb2b95e96c159afe3226fe6a001ff780a38813fe4 (diff)
Merge pull request #5809 from ogniK5377/FlushAudioOutBuffers
audout: FlushAudioOutBuffers
Diffstat (limited to 'src/audio_core/stream.cpp')
-rw-r--r--src/audio_core/stream.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/audio_core/stream.cpp b/src/audio_core/stream.cpp
index afe68c9ed..5b0b285cd 100644
--- a/src/audio_core/stream.cpp
+++ b/src/audio_core/stream.cpp
@@ -51,6 +51,14 @@ void Stream::Stop() {
UNIMPLEMENTED();
}
+bool Stream::Flush() {
+ const bool had_buffers = !queued_buffers.empty();
+ while (!queued_buffers.empty()) {
+ queued_buffers.pop();
+ }
+ return had_buffers;
+}
+
void Stream::SetVolume(float volume) {
game_volume = volume;
}