diff options
author | bunnei <bunneidev@gmail.com> | 2023-06-22 21:53:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-22 21:53:07 -0700 |
commit | 2fc5dedf6996d4a5c93ddf1ccd67a6963e4827e8 (patch) | |
tree | d82f2cf4f7a5e9773616846c095a941b282a84f6 /src/audio_core/out | |
parent | 3f3e4efb30de021fed52badc34808008276db9e7 (diff) | |
parent | 5da70f719703084482933e103e561cc98163f370 (diff) |
Merge pull request #10457 from Kelebek1/optimise
Remove memory allocations in some hot paths
Diffstat (limited to 'src/audio_core/out')
-rw-r--r-- | src/audio_core/out/audio_out_system.cpp | 4 |
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); } |