From 276be7f8cc61e57278fe7e8687f1bbff3486d38c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kleines=20Filmr=C3=B6llchen?= Date: Sun, 13 Nov 2022 17:38:01 +0100 Subject: [PATCH] Piano: Guard against all allocations at top level of the audio pipeline Therefore, we don't rely on LibDSP Processors to use allocation guards themselves. It also demonstrates that nested allocation guards work correctly :^) --- Userland/Applications/Piano/TrackManager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Applications/Piano/TrackManager.cpp b/Userland/Applications/Piano/TrackManager.cpp index 2b189afc65c..93a15cc754b 100644 --- a/Userland/Applications/Piano/TrackManager.cpp +++ b/Userland/Applications/Piano/TrackManager.cpp @@ -9,6 +9,7 @@ #include "TrackManager.h" #include "Music.h" +#include #include #include #include @@ -35,6 +36,7 @@ void TrackManager::time_forward(int amount) void TrackManager::fill_buffer(FixedArray& buffer) { + NoAllocationGuard guard; VERIFY(buffer.size() == m_temporary_track_buffer.size()); size_t sample_count = buffer.size(); // No need to zero the temp buffer as the track overwrites it anyways.