mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:47:46 +00:00
LibDSP: Add a fixed mastering processor to Track
This processor will not appear in the normal processor chain later on, but is used for final mixing of the track.
This commit is contained in:
parent
ab2d8edcbb
commit
b29d27c948
2 changed files with 7 additions and 5 deletions
|
@ -4,10 +4,9 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include "AK/NonnullRefPtr.h"
|
||||
#include "AK/Userspace.h"
|
||||
#include <AK/FixedArray.h>
|
||||
#include <AK/NoAllocationGuard.h>
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <AK/Optional.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <AK/TypedTransfer.h>
|
||||
|
@ -91,8 +90,8 @@ void Track::current_signal(FixedArray<Sample>& output_signal)
|
|||
}
|
||||
VERIFY(source_signal->type() == SignalType::Sample);
|
||||
VERIFY(output_signal.size() == source_signal->get<FixedArray<Sample>>().size());
|
||||
// This is one final unavoidable memcopy. Otherwise we need to special-case the last processor or
|
||||
AK::TypedTransfer<Sample>::copy(output_signal.data(), source_signal->get<FixedArray<Sample>>().data(), output_signal.size());
|
||||
// The last processor is the fixed mastering processor. This can write directly to the output data. We also just trust this processor that it does the right thing :^)
|
||||
m_track_mastering->process_to_fixed_array(*source_signal, output_signal);
|
||||
}
|
||||
|
||||
void NoteTrack::compute_current_clips_signal()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue