mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-18 12:48:04 -05:00
audout: FlushAudioOutBuffers
Fixes Devil May Cry
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
@ -56,6 +56,9 @@ public:
|
||||
/// Queues a buffer into the audio stream, returns true on success
|
||||
bool QueueBuffer(BufferPtr&& buffer);
|
||||
|
||||
/// Flush audio buffers
|
||||
bool Flush();
|
||||
|
||||
/// Returns true if the audio stream contains a buffer with the specified tag
|
||||
[[nodiscard]] bool ContainsBuffer(Buffer::Tag tag) const;
|
||||
|
||||
|
Reference in New Issue
Block a user