aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/audio_core/out
diff options
context:
space:
mode:
authorKelebek1 <[email protected]>2023-05-23 14:45:54 +0100
committerKelebek1 <[email protected]>2023-06-22 08:05:10 +0100
commit5da70f719703084482933e103e561cc98163f370 (patch)
tree1926842ed2b90bf92b89cec6a314bb28c7287fe9 /src/audio_core/out
parente3122c5b468fd59b7eded5a3a7300643d05616bc (diff)
downloadyuzu-mainline-5da70f719703084482933e103e561cc98163f370.tar.gz
yuzu-mainline-5da70f719703084482933e103e561cc98163f370.zip
Remove memory allocations in some hot paths
Diffstat (limited to 'src/audio_core/out')
-rw-r--r--src/audio_core/out/audio_out_system.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/audio_core/out/audio_out_system.cpp b/src/audio_core/out/audio_out_system.cpp
index bd13f7219..0adf64bd3 100644
--- a/src/audio_core/out/audio_out_system.cpp
+++ b/src/audio_core/out/audio_out_system.cpp
@@ -89,7 +89,7 @@ Result System::Start() {
session->Start();
state = State::Started;
- std::vector<AudioBuffer> buffers_to_flush{};
+ boost::container::static_vector<AudioBuffer, BufferCount> buffers_to_flush{};
buffers.RegisterBuffers(buffers_to_flush);
session->AppendBuffers(buffers_to_flush);
session->SetRingSize(static_cast<u32>(buffers_to_flush.size()));
@@ -134,7 +134,7 @@ bool System::AppendBuffer(const AudioOutBuffer& buffer, u64 tag) {
void System::RegisterBuffers() {
if (state == State::Started) {
- std::vector<AudioBuffer> registered_buffers{};
+ boost::container::static_vector<AudioBuffer, BufferCount> registered_buffers{};
buffers.RegisterBuffers(registered_buffers);
session->AppendBuffers(registered_buffers);
}