1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:57:45 +00:00

LibDSP: Get rid of DeprecatedString

This was a rather easy change, since only parameter names make use of
strings in the first place.

This also improves OOM resistance: If we can't create a parameter name,
we will just set it to the empty string.
This commit is contained in:
kleines Filmröllchen 2023-02-25 12:07:01 +01:00 committed by Linus Groh
parent 8a50c967b8
commit 76b71fcb75
7 changed files with 27 additions and 27 deletions

View file

@ -18,12 +18,12 @@
namespace DSP::Synthesizers {
Classic::Classic(NonnullRefPtr<Transport> transport)
: DSP::SynthesizerProcessor(transport)
, m_waveform("Waveform"sv, Waveform::Saw)
, m_attack("Attack"sv, 0.01, 2000, 5, Logarithmic::Yes)
, m_decay("Decay"sv, 0.01, 20'000, 80, Logarithmic::Yes)
, m_sustain("Sustain"sv, 0.001, 1, 0.725, Logarithmic::No)
, m_release("Release", 0.01, 6'000, 120, Logarithmic::Yes)
: DSP::SynthesizerProcessor(move(transport))
, m_waveform(String::from_utf8("Waveform"sv), Waveform::Saw)
, m_attack(String::from_utf8_short_string("Attack"sv), 0.01, 2000, 5, Logarithmic::Yes)
, m_decay(String::from_utf8_short_string("Decay"sv), 0.01, 20'000, 80, Logarithmic::Yes)
, m_sustain(String::from_utf8_short_string("Sustain"sv), 0.001, 1, 0.725, Logarithmic::No)
, m_release(String::from_utf8_short_string("Release"sv), 0.01, 6'000, 120, Logarithmic::Yes)
{
m_parameters.append(m_waveform);
m_parameters.append(m_attack);