summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-07-17 20:54:09 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-07-17 20:54:09 +0200
commit4adbddeb361069711cca305cfda01741c72342fe (patch)
treeddb3eceb8fa7df53aac144793cdbfa7a902439c4
parent9c8dd836fc079666f3dfa92ae23c31d7c46bd769 (diff)
downloadserenity-4adbddeb361069711cca305cfda01741c72342fe.zip
AudioServer: Use Vector::append(Vector&&) for pending mix buffers.
Vector::append(Vector&&) is a simple pointer transfer when appending to an empty Vector. :^)
-rw-r--r--Servers/AudioServer/ASMixer.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Servers/AudioServer/ASMixer.cpp b/Servers/AudioServer/ASMixer.cpp
index 554085c440..2881f1717c 100644
--- a/Servers/AudioServer/ASMixer.cpp
+++ b/Servers/AudioServer/ASMixer.cpp
@@ -33,9 +33,7 @@ void ASMixer::mix()
for (;;) {
{
CLocker lock(m_lock);
- for (const auto& buf : m_pending_mixing)
- active_mix_buffers.append(buf);
- m_pending_mixing.clear();
+ active_mix_buffers.append(move(m_pending_mixing));
}
// ### use a wakeup of some kind rather than this garbage