summaryrefslogtreecommitdiffstats
path: root/src/audio_core/sink/sink_stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio_core/sink/sink_stream.h')
-rw-r--r--src/audio_core/sink/sink_stream.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/audio_core/sink/sink_stream.h b/src/audio_core/sink/sink_stream.h
index 41cbadc9c..98d72ace1 100644
--- a/src/audio_core/sink/sink_stream.h
+++ b/src/audio_core/sink/sink_stream.h
@@ -16,6 +16,7 @@
#include "common/polyfill_thread.h"
#include "common/reader_writer_queue.h"
#include "common/ring_buffer.h"
+#include "common/scratch_buffer.h"
#include "common/thread.h"
namespace Core {
@@ -170,7 +171,7 @@ public:
* @param buffer - Audio buffer information to be queued.
* @param samples - The s16 samples to be queue for playback.
*/
- virtual void AppendBuffer(SinkBuffer& buffer, std::vector<s16>& samples);
+ virtual void AppendBuffer(SinkBuffer& buffer, std::span<s16> samples);
/**
* Release a buffer. Audio In only, will fill a buffer with recorded samples.
@@ -255,6 +256,8 @@ private:
/// Signalled when ring buffer entries are consumed
std::condition_variable_any release_cv;
std::mutex release_mutex;
+ /// Temporary buffer for appending samples when upmixing
+ Common::ScratchBuffer<s16> tmp_samples{};
};
using SinkStreamPtr = std::unique_ptr<SinkStream>;