mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 16:16:43 +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:
parent
8a50c967b8
commit
76b71fcb75
Notes:
sideshowbarker
2024-07-18 00:41:35 +09:00
Author: https://github.com/kleinesfilmroellchen
Commit: 76b71fcb75
Pull-request: https://github.com/SerenityOS/serenity/pull/17616
7 changed files with 27 additions and 27 deletions
|
@ -12,9 +12,9 @@ namespace DSP::Effects {
|
|||
|
||||
Delay::Delay(NonnullRefPtr<Transport> transport)
|
||||
: EffectProcessor(move(transport))
|
||||
, m_delay_decay("Decay"sv, 0.01, 0.99, 0.33, Logarithmic::No)
|
||||
, m_delay_time("Delay Time"sv, 3, 2000, 900, Logarithmic::Yes)
|
||||
, m_dry_gain("Dry"sv, 0, 1, 0.9, Logarithmic::No)
|
||||
, m_delay_decay(String::from_utf8_short_string("Decay"sv), 0.01, 0.99, 0.33, Logarithmic::No)
|
||||
, m_delay_time(String::from_utf8("Delay Time"sv), 3, 2000, 900, Logarithmic::Yes)
|
||||
, m_dry_gain(String::from_utf8_short_string("Dry"sv), 0, 1, 0.9, Logarithmic::No)
|
||||
{
|
||||
|
||||
m_parameters.append(m_delay_decay);
|
||||
|
@ -59,9 +59,9 @@ void Delay::process_impl(Signal const& input_signal, Signal& output_signal)
|
|||
|
||||
Mastering::Mastering(NonnullRefPtr<Transport> transport)
|
||||
: EffectProcessor(move(transport))
|
||||
, m_pan("Pan", -1, 1, 0, Logarithmic::No)
|
||||
, m_volume("Volume", 0, 1, 1, Logarithmic::No)
|
||||
, m_muted("Mute", false)
|
||||
, m_pan(String::from_utf8_short_string("Pan"sv), -1, 1, 0, Logarithmic::No)
|
||||
, m_volume(String::from_utf8_short_string("Volume"sv), 0, 1, 1, Logarithmic::No)
|
||||
, m_muted(String::from_utf8_short_string("Mute"sv), false)
|
||||
{
|
||||
m_parameters.append(m_muted);
|
||||
m_parameters.append(m_volume);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue