mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:57:46 +00:00
LibDSP: Rename library namespace to DSP
That's the standard naming convention, but I didn't follow it when originally creating LibDSP and nobody corrected me, so here I am one year later :^)
This commit is contained in:
parent
3f59356c79
commit
00e13b5b27
36 changed files with 92 additions and 92 deletions
|
@ -19,7 +19,7 @@ requires(IsEnum<EnumT>) class ProcessorParameterDropdown : public GUI::ComboBox
|
|||
C_OBJECT(ProcessorParameterDropdown);
|
||||
|
||||
public:
|
||||
ProcessorParameterDropdown(LibDSP::ProcessorEnumParameter<EnumT>& parameter, Vector<String> modes)
|
||||
ProcessorParameterDropdown(DSP::ProcessorEnumParameter<EnumT>& parameter, Vector<String> modes)
|
||||
: ComboBox()
|
||||
, m_parameter(parameter)
|
||||
, m_modes(move(modes))
|
||||
|
@ -33,7 +33,7 @@ public:
|
|||
|
||||
on_change = [this]([[maybe_unused]] auto name, GUI::ModelIndex model_index) {
|
||||
auto value = static_cast<EnumT>(model_index.row());
|
||||
m_parameter.set_value_sneaky(value, LibDSP::Detail::ProcessorParameterSetValueTag {});
|
||||
m_parameter.set_value_sneaky(value, DSP::Detail::ProcessorParameterSetValueTag {});
|
||||
};
|
||||
m_parameter.did_change_value = [this](auto new_value) {
|
||||
set_selected_index(static_cast<int>(new_value));
|
||||
|
@ -53,6 +53,6 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
LibDSP::ProcessorEnumParameter<EnumT>& m_parameter;
|
||||
DSP::ProcessorEnumParameter<EnumT>& m_parameter;
|
||||
Vector<String> m_modes;
|
||||
};
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <AK/FixedPoint.h>
|
||||
#include <AK/Math.h>
|
||||
|
||||
ProcessorParameterSlider::ProcessorParameterSlider(Orientation orientation, LibDSP::ProcessorRangeParameter& parameter, RefPtr<GUI::Label> value_label)
|
||||
ProcessorParameterSlider::ProcessorParameterSlider(Orientation orientation, DSP::ProcessorRangeParameter& parameter, RefPtr<GUI::Label> value_label)
|
||||
: Slider(orientation)
|
||||
, WidgetWithLabel(move(value_label))
|
||||
, m_parameter(parameter)
|
||||
|
@ -30,13 +30,13 @@ ProcessorParameterSlider::ProcessorParameterSlider(Orientation orientation, LibD
|
|||
m_value_label->set_text(String::formatted("{:.2f}", static_cast<double>(m_parameter)));
|
||||
|
||||
on_change = [this](auto value) {
|
||||
LibDSP::ParameterFixedPoint real_value;
|
||||
DSP::ParameterFixedPoint real_value;
|
||||
real_value.raw() = value;
|
||||
if (is_logarithmic())
|
||||
// FIXME: Implement exponential for fixed point
|
||||
real_value = exp(static_cast<double>(real_value));
|
||||
|
||||
m_parameter.set_value_sneaky(real_value, LibDSP::Detail::ProcessorParameterSetValueTag {});
|
||||
m_parameter.set_value_sneaky(real_value, DSP::Detail::ProcessorParameterSetValueTag {});
|
||||
if (m_value_label) {
|
||||
double value = static_cast<double>(m_parameter);
|
||||
String label_text = String::formatted("{:.2f}", value);
|
||||
|
|
|
@ -20,11 +20,11 @@ class ProcessorParameterSlider
|
|||
C_OBJECT(ProcessorParameterSlider);
|
||||
|
||||
public:
|
||||
ProcessorParameterSlider(Orientation, LibDSP::ProcessorRangeParameter&, RefPtr<GUI::Label>);
|
||||
constexpr bool is_logarithmic() const { return m_parameter.is_logarithmic() == LibDSP::Logarithmic::Yes; }
|
||||
ProcessorParameterSlider(Orientation, DSP::ProcessorRangeParameter&, RefPtr<GUI::Label>);
|
||||
constexpr bool is_logarithmic() const { return m_parameter.is_logarithmic() == DSP::Logarithmic::Yes; }
|
||||
|
||||
protected:
|
||||
LibDSP::ProcessorRangeParameter& m_parameter;
|
||||
DSP::ProcessorRangeParameter& m_parameter;
|
||||
|
||||
private:
|
||||
// Converts based on processor parameter boundaries.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue