diff --git a/Userland/Applications/Piano/KeysWidget.cpp b/Userland/Applications/Piano/KeysWidget.cpp index e7f48dd06b..624ccd5990 100644 --- a/Userland/Applications/Piano/KeysWidget.cpp +++ b/Userland/Applications/Piano/KeysWidget.cpp @@ -7,13 +7,13 @@ */ #include "KeysWidget.h" -#include "LibDSP/Keyboard.h" #include "TrackManager.h" #include #include +#include #include -KeysWidget::KeysWidget(NonnullRefPtr keyboard) +KeysWidget::KeysWidget(NonnullRefPtr keyboard) : m_keyboard(move(keyboard)) { set_fill_with_background_color(true); @@ -27,7 +27,7 @@ int KeysWidget::mouse_note() const return -1; } -void KeysWidget::set_key(i8 key, LibDSP::Keyboard::Switch switch_note) +void KeysWidget::set_key(i8 key, DSP::Keyboard::Switch switch_note) { m_keyboard->set_keyboard_note_in_active_octave(key, switch_note); } @@ -253,7 +253,7 @@ void KeysWidget::mousedown_event(GUI::MouseEvent& event) m_mouse_note = note_for_event_position(event.position()); - set_key(m_mouse_note, LibDSP::Keyboard::Switch::On); + set_key(m_mouse_note, DSP::Keyboard::Switch::On); update(); } @@ -264,7 +264,7 @@ void KeysWidget::mouseup_event(GUI::MouseEvent& event) m_mouse_down = false; - set_key(m_mouse_note, LibDSP::Keyboard::Switch::Off); + set_key(m_mouse_note, DSP::Keyboard::Switch::Off); update(); } @@ -278,8 +278,8 @@ void KeysWidget::mousemove_event(GUI::MouseEvent& event) if (m_mouse_note == new_mouse_note) return; - set_key(m_mouse_note, LibDSP::Keyboard::Switch::Off); - set_key(new_mouse_note, LibDSP::Keyboard::Switch::On); + set_key(m_mouse_note, DSP::Keyboard::Switch::Off); + set_key(new_mouse_note, DSP::Keyboard::Switch::On); update(); m_mouse_note = new_mouse_note; diff --git a/Userland/Applications/Piano/KeysWidget.h b/Userland/Applications/Piano/KeysWidget.h index 96c4743ddf..a90796f2f5 100644 --- a/Userland/Applications/Piano/KeysWidget.h +++ b/Userland/Applications/Piano/KeysWidget.h @@ -24,7 +24,7 @@ public: int mouse_note() const; private: - KeysWidget(NonnullRefPtr); + KeysWidget(NonnullRefPtr); virtual void paint_event(GUI::PaintEvent&) override; virtual void mousedown_event(GUI::MouseEvent&) override; @@ -33,9 +33,9 @@ private: int note_for_event_position(Gfx::IntPoint const&) const; - void set_key(i8 key, LibDSP::Keyboard::Switch); + void set_key(i8 key, DSP::Keyboard::Switch); - NonnullRefPtr m_keyboard; + NonnullRefPtr m_keyboard; bool m_mouse_down { false }; int m_mouse_note { -1 }; diff --git a/Userland/Applications/Piano/KnobsWidget.cpp b/Userland/Applications/Piano/KnobsWidget.cpp index 74281af578..6a5a00d83f 100644 --- a/Userland/Applications/Piano/KnobsWidget.cpp +++ b/Userland/Applications/Piano/KnobsWidget.cpp @@ -70,23 +70,23 @@ KnobsWidget::KnobsWidget(TrackManager& track_manager, MainWidget& main_widget) for (auto& raw_parameter : m_track_manager.current_track().synth()->parameters()) { // The synth has range and enum parameters switch (raw_parameter.type()) { - case LibDSP::ParameterType::Range: { - auto& parameter = static_cast(raw_parameter); + case DSP::ParameterType::Range: { + auto& parameter = static_cast(raw_parameter); m_synth_values.append(m_values_container->add(String::number(static_cast(parameter.value())))); auto& parameter_knob_value = m_synth_values.last(); m_synth_labels.append(m_labels_container->add(String::formatted("Synth: {}", parameter.name()))); m_synth_knobs.append(m_knobs_container->add(Orientation::Vertical, parameter, parameter_knob_value)); break; } - case LibDSP::ParameterType::Enum: { + case DSP::ParameterType::Enum: { // FIXME: We shouldn't do that, but we know the synth and it is nice - auto& parameter = static_cast&>(raw_parameter); + auto& parameter = static_cast&>(raw_parameter); // The value is empty for enum parameters m_synth_values.append(m_values_container->add(String::empty())); m_synth_labels.append(m_labels_container->add(String::formatted("Synth: {}", parameter.name()))); auto enum_strings = Vector { "Sine", "Triangle", "Square", "Saw", "Noise" }; - m_synth_knobs.append(m_knobs_container->add>(parameter, move(enum_strings))); - m_synth_waveform = static_cast&>(m_synth_knobs.last()); + m_synth_knobs.append(m_knobs_container->add>(parameter, move(enum_strings))); + m_synth_waveform = static_cast&>(m_synth_knobs.last()); break; } default: @@ -96,7 +96,7 @@ KnobsWidget::KnobsWidget(TrackManager& track_manager, MainWidget& main_widget) for (auto& raw_parameter : m_track_manager.current_track().delay()->parameters()) { // FIXME: We shouldn't do that, but we know the effect and it's nice. - auto& parameter = static_cast(raw_parameter); + auto& parameter = static_cast(raw_parameter); m_delay_values.append(m_values_container->add(String::number(static_cast(parameter.value())))); auto& parameter_knob_value = m_delay_values.last(); m_delay_labels.append(m_labels_container->add(String::formatted("Delay: {}", parameter.name()))); diff --git a/Userland/Applications/Piano/KnobsWidget.h b/Userland/Applications/Piano/KnobsWidget.h index 9021f76651..af3d55a352 100644 --- a/Userland/Applications/Piano/KnobsWidget.h +++ b/Userland/Applications/Piano/KnobsWidget.h @@ -49,7 +49,7 @@ private: RefPtr m_knobs_container; RefPtr m_volume_knob; RefPtr m_octave_knob; - RefPtr> m_synth_waveform; + RefPtr> m_synth_waveform; NonnullRefPtrVector m_synth_knobs; NonnullRefPtrVector m_delay_knobs; diff --git a/Userland/Applications/Piano/MainWidget.cpp b/Userland/Applications/Piano/MainWidget.cpp index 3c19b17244..b413a38298 100644 --- a/Userland/Applications/Piano/MainWidget.cpp +++ b/Userland/Applications/Piano/MainWidget.cpp @@ -85,7 +85,7 @@ void MainWidget::keydown_event(GUI::KeyEvent& event) else m_keys_pressed[event.key()] = true; - note_key_action(event.key(), LibDSP::Keyboard::Switch::On); + note_key_action(event.key(), DSP::Keyboard::Switch::On); special_key_action(event.key()); m_keys_widget->update(); } @@ -94,11 +94,11 @@ void MainWidget::keyup_event(GUI::KeyEvent& event) { m_keys_pressed[event.key()] = false; - note_key_action(event.key(), LibDSP::Keyboard::Switch::Off); + note_key_action(event.key(), DSP::Keyboard::Switch::Off); m_keys_widget->update(); } -void MainWidget::note_key_action(int key_code, LibDSP::Keyboard::Switch switch_note) +void MainWidget::note_key_action(int key_code, DSP::Keyboard::Switch switch_note) { auto key = m_keys_widget->key_code_to_key(key_code); if (key == -1) @@ -110,10 +110,10 @@ void MainWidget::special_key_action(int key_code) { switch (key_code) { case Key_Z: - set_octave_and_ensure_note_change(LibDSP::Keyboard::Direction::Down); + set_octave_and_ensure_note_change(DSP::Keyboard::Direction::Down); break; case Key_X: - set_octave_and_ensure_note_change(LibDSP::Keyboard::Direction::Up); + set_octave_and_ensure_note_change(DSP::Keyboard::Direction::Up); break; case Key_C: m_knobs_widget->cycle_waveform(); @@ -127,20 +127,20 @@ void MainWidget::special_key_action(int key_code) void MainWidget::turn_off_pressed_keys() { if (m_keys_widget->mouse_note() != -1) - m_track_manager.keyboard()->set_keyboard_note_in_active_octave(m_keys_widget->mouse_note(), LibDSP::Keyboard::Switch::Off); + m_track_manager.keyboard()->set_keyboard_note_in_active_octave(m_keys_widget->mouse_note(), DSP::Keyboard::Switch::Off); for (int i = 0; i < key_code_count; ++i) { if (m_keys_pressed[i]) - note_key_action(i, LibDSP::Keyboard::Switch::Off); + note_key_action(i, DSP::Keyboard::Switch::Off); } } void MainWidget::turn_on_pressed_keys() { if (m_keys_widget->mouse_note() != -1) - m_track_manager.keyboard()->set_keyboard_note_in_active_octave(m_keys_widget->mouse_note(), LibDSP::Keyboard::Switch::On); + m_track_manager.keyboard()->set_keyboard_note_in_active_octave(m_keys_widget->mouse_note(), DSP::Keyboard::Switch::On); for (int i = 0; i < key_code_count; ++i) { if (m_keys_pressed[i]) - note_key_action(i, LibDSP::Keyboard::Switch::On); + note_key_action(i, DSP::Keyboard::Switch::On); } } @@ -154,7 +154,7 @@ void MainWidget::set_octave_and_ensure_note_change(int octave) m_keys_widget->update(); } -void MainWidget::set_octave_and_ensure_note_change(LibDSP::Keyboard::Direction direction) +void MainWidget::set_octave_and_ensure_note_change(DSP::Keyboard::Direction direction) { turn_off_pressed_keys(); m_track_manager.keyboard()->change_virtual_keyboard_octave(direction); diff --git a/Userland/Applications/Piano/MainWidget.h b/Userland/Applications/Piano/MainWidget.h index 2e2b98d76e..dac1a73904 100644 --- a/Userland/Applications/Piano/MainWidget.h +++ b/Userland/Applications/Piano/MainWidget.h @@ -29,7 +29,7 @@ public: void add_track_actions(GUI::Menu&); - void set_octave_and_ensure_note_change(LibDSP::Keyboard::Direction); + void set_octave_and_ensure_note_change(DSP::Keyboard::Direction); void set_octave_and_ensure_note_change(int); private: @@ -39,7 +39,7 @@ private: virtual void keyup_event(GUI::KeyEvent&) override; virtual void custom_event(Core::CustomEvent&) override; - void note_key_action(int key_code, LibDSP::Keyboard::Switch); + void note_key_action(int key_code, DSP::Keyboard::Switch); void special_key_action(int key_code); void turn_off_pressed_keys(); diff --git a/Userland/Applications/Piano/ProcessorParameterWidget/Dropdown.h b/Userland/Applications/Piano/ProcessorParameterWidget/Dropdown.h index 001789cd4b..326bf2b189 100644 --- a/Userland/Applications/Piano/ProcessorParameterWidget/Dropdown.h +++ b/Userland/Applications/Piano/ProcessorParameterWidget/Dropdown.h @@ -19,7 +19,7 @@ requires(IsEnum) class ProcessorParameterDropdown : public GUI::ComboBox C_OBJECT(ProcessorParameterDropdown); public: - ProcessorParameterDropdown(LibDSP::ProcessorEnumParameter& parameter, Vector modes) + ProcessorParameterDropdown(DSP::ProcessorEnumParameter& parameter, Vector 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(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(new_value)); @@ -53,6 +53,6 @@ public: } private: - LibDSP::ProcessorEnumParameter& m_parameter; + DSP::ProcessorEnumParameter& m_parameter; Vector m_modes; }; diff --git a/Userland/Applications/Piano/ProcessorParameterWidget/Slider.cpp b/Userland/Applications/Piano/ProcessorParameterWidget/Slider.cpp index 178a6ab8dc..454484874d 100644 --- a/Userland/Applications/Piano/ProcessorParameterWidget/Slider.cpp +++ b/Userland/Applications/Piano/ProcessorParameterWidget/Slider.cpp @@ -9,7 +9,7 @@ #include #include -ProcessorParameterSlider::ProcessorParameterSlider(Orientation orientation, LibDSP::ProcessorRangeParameter& parameter, RefPtr value_label) +ProcessorParameterSlider::ProcessorParameterSlider(Orientation orientation, DSP::ProcessorRangeParameter& parameter, RefPtr 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(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(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(m_parameter); String label_text = String::formatted("{:.2f}", value); diff --git a/Userland/Applications/Piano/ProcessorParameterWidget/Slider.h b/Userland/Applications/Piano/ProcessorParameterWidget/Slider.h index 9546af76bf..ea93937b76 100644 --- a/Userland/Applications/Piano/ProcessorParameterWidget/Slider.h +++ b/Userland/Applications/Piano/ProcessorParameterWidget/Slider.h @@ -20,11 +20,11 @@ class ProcessorParameterSlider C_OBJECT(ProcessorParameterSlider); public: - ProcessorParameterSlider(Orientation, LibDSP::ProcessorRangeParameter&, RefPtr); - constexpr bool is_logarithmic() const { return m_parameter.is_logarithmic() == LibDSP::Logarithmic::Yes; } + ProcessorParameterSlider(Orientation, DSP::ProcessorRangeParameter&, RefPtr); + 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. diff --git a/Userland/Applications/Piano/RollWidget.h b/Userland/Applications/Piano/RollWidget.h index 76f7599bb0..bc7a8e9129 100644 --- a/Userland/Applications/Piano/RollWidget.h +++ b/Userland/Applications/Piano/RollWidget.h @@ -15,7 +15,7 @@ #include class TrackManager; -using LibDSP::RollNote; +using DSP::RollNote; class RollWidget final : public GUI::AbstractScrollableWidget { C_OBJECT(RollWidget) diff --git a/Userland/Applications/Piano/Track.cpp b/Userland/Applications/Piano/Track.cpp index 117d7b350d..892cb409de 100644 --- a/Userland/Applications/Piano/Track.cpp +++ b/Userland/Applications/Piano/Track.cpp @@ -16,10 +16,10 @@ #include #include -Track::Track(NonnullRefPtr transport, NonnullRefPtr keyboard) +Track::Track(NonnullRefPtr transport, NonnullRefPtr keyboard) : m_transport(move(transport)) - , m_delay(make_ref_counted(m_transport)) - , m_synth(make_ref_counted(m_transport)) + , m_delay(make_ref_counted(m_transport)) + , m_synth(make_ref_counted(m_transport)) , m_keyboard(move(keyboard)) { set_volume(volume_max); @@ -27,7 +27,7 @@ Track::Track(NonnullRefPtr transport, NonnullRefPtr::must_create_but_fixme_should_propagate_errors(1) }; + auto synthesized_sample = DSP::Signal { FixedArray::must_create_but_fixme_should_propagate_errors(1) }; m_synth->process(playing_notes, synthesized_sample); - auto delayed_signal = LibDSP::Signal { FixedArray::must_create_but_fixme_should_propagate_errors(1) }; + auto delayed_signal = DSP::Signal { FixedArray::must_create_but_fixme_should_propagate_errors(1) }; m_delay->process(synthesized_sample, delayed_signal); auto delayed_sample = delayed_signal.get>()[0]; diff --git a/Userland/Applications/Piano/Track.h b/Userland/Applications/Piano/Track.h index bd0800acf4..a4e792a18d 100644 --- a/Userland/Applications/Piano/Track.h +++ b/Userland/Applications/Piano/Track.h @@ -19,7 +19,7 @@ #include #include -using LibDSP::RollNote; +using DSP::RollNote; using RollIter = AK::SinglyLinkedListIterator, RollNote>; class Track { @@ -27,14 +27,14 @@ class Track { AK_MAKE_NONMOVABLE(Track); public: - Track(NonnullRefPtr, NonnullRefPtr); + Track(NonnullRefPtr, NonnullRefPtr); ~Track() = default; Vector const& recorded_sample() const { return m_recorded_sample; } SinglyLinkedList const& roll_notes(int note) const { return m_roll_notes[note]; } int volume() const { return m_volume; } - NonnullRefPtr synth() { return m_synth; } - NonnullRefPtr delay() { return m_delay; } + NonnullRefPtr synth() { return m_synth; } + NonnullRefPtr delay() { return m_delay; } void fill_sample(Sample& sample); void reset(); @@ -52,12 +52,12 @@ private: int m_volume; - NonnullRefPtr m_transport; - NonnullRefPtr m_delay; - NonnullRefPtr m_synth; + NonnullRefPtr m_transport; + NonnullRefPtr m_delay; + NonnullRefPtr m_synth; SinglyLinkedList m_roll_notes[note_count]; RollIter m_roll_iterators[note_count]; - NonnullRefPtr m_keyboard; + NonnullRefPtr m_keyboard; bool m_is_active_track { false }; }; diff --git a/Userland/Applications/Piano/TrackManager.cpp b/Userland/Applications/Piano/TrackManager.cpp index d4fc774905..e447f857da 100644 --- a/Userland/Applications/Piano/TrackManager.cpp +++ b/Userland/Applications/Piano/TrackManager.cpp @@ -12,8 +12,8 @@ #include TrackManager::TrackManager() - : m_transport(make_ref_counted(120, 4)) - , m_keyboard(make_ref_counted(m_transport)) + : m_transport(make_ref_counted(120, 4)) + , m_keyboard(make_ref_counted(m_transport)) { add_track(); m_tracks[m_current_track]->set_active(true); diff --git a/Userland/Applications/Piano/TrackManager.h b/Userland/Applications/Piano/TrackManager.h index 7e96d5544a..d9407777c9 100644 --- a/Userland/Applications/Piano/TrackManager.h +++ b/Userland/Applications/Piano/TrackManager.h @@ -9,14 +9,14 @@ #pragma once -#include "AK/NonnullRefPtr.h" -#include "LibDSP/Keyboard.h" #include "Music.h" #include "Track.h" #include #include #include +#include #include +#include class TrackManager { AK_MAKE_NONCOPYABLE(TrackManager); @@ -38,22 +38,22 @@ public: m_tracks[m_current_track]->set_active(true); } - NonnullRefPtr transport() const { return m_transport; } - NonnullRefPtr keyboard() const { return m_keyboard; } + NonnullRefPtr transport() const { return m_transport; } + NonnullRefPtr keyboard() const { return m_keyboard; } // Legacy API, do not add new users. void time_forward(int amount); void fill_buffer(Span); void reset(); - void set_keyboard_note(int note, LibDSP::Keyboard::Switch note_switch); + void set_keyboard_note(int note, DSP::Keyboard::Switch note_switch); void set_should_loop(bool b) { m_should_loop = b; } void add_track(); int next_track_index() const; private: Vector> m_tracks; - NonnullRefPtr m_transport; - NonnullRefPtr m_keyboard; + NonnullRefPtr m_transport; + NonnullRefPtr m_keyboard; size_t m_current_track { 0 }; Array m_front_buffer; diff --git a/Userland/Applications/SoundPlayer/BarsVisualizationWidget.cpp b/Userland/Applications/SoundPlayer/BarsVisualizationWidget.cpp index cf9af8f782..06dcca5415 100644 --- a/Userland/Applications/SoundPlayer/BarsVisualizationWidget.cpp +++ b/Userland/Applications/SoundPlayer/BarsVisualizationWidget.cpp @@ -32,7 +32,7 @@ void BarsVisualizationWidget::render(GUI::PaintEvent& event, FixedArray c AK::TypedTransfer::copy(m_previous_samples.data(), samples.data(), samples.size()); - LibDSP::fft(m_fft_samples.span(), false); + DSP::fft(m_fft_samples.span(), false); Array groups {}; @@ -102,7 +102,7 @@ BarsVisualizationWidget::BarsVisualizationWidget() logarithmic_spectrum_action->set_checked(true); m_context_menu->add_action(logarithmic_spectrum_action); - m_fft_window = LibDSP::Window::hann(); + m_fft_window = DSP::Window::hann(); // As we use full-overlapping windows, the passed-in data is only half the size of one FFT operation. MUST(set_render_sample_count(fft_size / 2)); diff --git a/Userland/Applications/VideoPlayer/main.cpp b/Userland/Applications/VideoPlayer/main.cpp index 22c2d103e1..470e955d61 100644 --- a/Userland/Applications/VideoPlayer/main.cpp +++ b/Userland/Applications/VideoPlayer/main.cpp @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include +#include #include #include #include diff --git a/Userland/Libraries/LibAudio/MP3Loader.cpp b/Userland/Libraries/LibAudio/MP3Loader.cpp index b41b447141..a9b7ad4b10 100644 --- a/Userland/Libraries/LibAudio/MP3Loader.cpp +++ b/Userland/Libraries/LibAudio/MP3Loader.cpp @@ -13,8 +13,8 @@ namespace Audio { -LibDSP::MDCT<12> MP3LoaderPlugin::s_mdct_12; -LibDSP::MDCT<36> MP3LoaderPlugin::s_mdct_36; +DSP::MDCT<12> MP3LoaderPlugin::s_mdct_12; +DSP::MDCT<36> MP3LoaderPlugin::s_mdct_36; MP3LoaderPlugin::MP3LoaderPlugin(StringView path) : m_file(Core::File::construct(path)) diff --git a/Userland/Libraries/LibAudio/MP3Loader.h b/Userland/Libraries/LibAudio/MP3Loader.h index 925dc9a9df..092ca85aba 100644 --- a/Userland/Libraries/LibAudio/MP3Loader.h +++ b/Userland/Libraries/LibAudio/MP3Loader.h @@ -58,8 +58,8 @@ private: AK::Vector> m_seek_table; AK::Array, 32>, 2> m_last_values {}; AK::Array, 2> m_synthesis_buffer {}; - static LibDSP::MDCT<36> s_mdct_36; - static LibDSP::MDCT<12> s_mdct_12; + static DSP::MDCT<36> s_mdct_36; + static DSP::MDCT<12> s_mdct_12; u32 m_sample_rate { 0 }; u8 m_num_channels { 0 }; diff --git a/Userland/Libraries/LibDSP/Clip.cpp b/Userland/Libraries/LibDSP/Clip.cpp index 8b672a764c..09f9a16176 100644 --- a/Userland/Libraries/LibDSP/Clip.cpp +++ b/Userland/Libraries/LibDSP/Clip.cpp @@ -6,7 +6,7 @@ #include "Clip.h" -namespace LibDSP { +namespace DSP { Sample AudioClip::sample_at(u32 time) { diff --git a/Userland/Libraries/LibDSP/Clip.h b/Userland/Libraries/LibDSP/Clip.h index 818a18d15b..a3511ffbc9 100644 --- a/Userland/Libraries/LibDSP/Clip.h +++ b/Userland/Libraries/LibDSP/Clip.h @@ -11,7 +11,7 @@ #include #include -namespace LibDSP { +namespace DSP { // A clip is a self-contained snippet of notes or audio that can freely move inside and in between tracks. class Clip : public RefCounted { diff --git a/Userland/Libraries/LibDSP/Effects.cpp b/Userland/Libraries/LibDSP/Effects.cpp index bce940f4a6..4df33748fd 100644 --- a/Userland/Libraries/LibDSP/Effects.cpp +++ b/Userland/Libraries/LibDSP/Effects.cpp @@ -8,7 +8,7 @@ #include #include -namespace LibDSP::Effects { +namespace DSP::Effects { Delay::Delay(NonnullRefPtr transport) : EffectProcessor(move(transport)) diff --git a/Userland/Libraries/LibDSP/Effects.h b/Userland/Libraries/LibDSP/Effects.h index 1f35bb2be3..c9844cca71 100644 --- a/Userland/Libraries/LibDSP/Effects.h +++ b/Userland/Libraries/LibDSP/Effects.h @@ -11,7 +11,7 @@ #include #include -namespace LibDSP::Effects { +namespace DSP::Effects { // A simple digital delay effect using a delay buffer. // This is based on Piano's old built-in delay. diff --git a/Userland/Libraries/LibDSP/Envelope.h b/Userland/Libraries/LibDSP/Envelope.h index 1edca55731..a456a579ef 100644 --- a/Userland/Libraries/LibDSP/Envelope.h +++ b/Userland/Libraries/LibDSP/Envelope.h @@ -8,7 +8,7 @@ #include -namespace LibDSP { +namespace DSP { // For now, this cannot be optimal as clang doesn't know underlying type specifications. enum EnvelopeState { diff --git a/Userland/Libraries/LibDSP/FFT.h b/Userland/Libraries/LibDSP/FFT.h index 22e6041b93..0bc35e44d5 100644 --- a/Userland/Libraries/LibDSP/FFT.h +++ b/Userland/Libraries/LibDSP/FFT.h @@ -10,7 +10,7 @@ #include #include -namespace LibDSP { +namespace DSP { constexpr void fft(Span> sample_data, bool invert = false) { diff --git a/Userland/Libraries/LibDSP/Keyboard.cpp b/Userland/Libraries/LibDSP/Keyboard.cpp index 38483243a2..0952aced49 100644 --- a/Userland/Libraries/LibDSP/Keyboard.cpp +++ b/Userland/Libraries/LibDSP/Keyboard.cpp @@ -9,7 +9,7 @@ #include #include -namespace LibDSP { +namespace DSP { void Keyboard::set_keyboard_note(u8 pitch, Keyboard::Switch note_switch) { diff --git a/Userland/Libraries/LibDSP/Keyboard.h b/Userland/Libraries/LibDSP/Keyboard.h index fa69bd29b2..5bb6f67b39 100644 --- a/Userland/Libraries/LibDSP/Keyboard.h +++ b/Userland/Libraries/LibDSP/Keyboard.h @@ -11,7 +11,7 @@ #include #include -namespace LibDSP { +namespace DSP { class Keyboard : public RefCounted { diff --git a/Userland/Libraries/LibDSP/MDCT.h b/Userland/Libraries/LibDSP/MDCT.h index 53643239d5..52d3e8b24a 100644 --- a/Userland/Libraries/LibDSP/MDCT.h +++ b/Userland/Libraries/LibDSP/MDCT.h @@ -10,7 +10,7 @@ #include #include -namespace LibDSP { +namespace DSP { template requires(N % 2 == 0) class MDCT { diff --git a/Userland/Libraries/LibDSP/Music.h b/Userland/Libraries/LibDSP/Music.h index 884189a348..182dad8b12 100644 --- a/Userland/Libraries/LibDSP/Music.h +++ b/Userland/Libraries/LibDSP/Music.h @@ -15,7 +15,7 @@ #include #include -namespace LibDSP { +namespace DSP { using Sample = Audio::Sample; diff --git a/Userland/Libraries/LibDSP/Processor.h b/Userland/Libraries/LibDSP/Processor.h index 7df6c9f4ba..83f6dcd39d 100644 --- a/Userland/Libraries/LibDSP/Processor.h +++ b/Userland/Libraries/LibDSP/Processor.h @@ -17,7 +17,7 @@ #include #include -namespace LibDSP { +namespace DSP { // A processor processes notes or audio into notes or audio. Processors are e.g. samplers, synthesizers, effects, arpeggiators etc. class Processor : public RefCounted { diff --git a/Userland/Libraries/LibDSP/ProcessorParameter.h b/Userland/Libraries/LibDSP/ProcessorParameter.h index e65884476c..8134d95253 100644 --- a/Userland/Libraries/LibDSP/ProcessorParameter.h +++ b/Userland/Libraries/LibDSP/ProcessorParameter.h @@ -14,7 +14,7 @@ #include #include -namespace LibDSP { +namespace DSP { using ParameterFixedPoint = FixedPoint<8, i64>; @@ -78,7 +78,7 @@ public: ParameterT value() const { return m_value; }; void set_value(ParameterT value) { - set_value_sneaky(value, LibDSP::Detail::ProcessorParameterSetValueTag {}); + set_value_sneaky(value, DSP::Detail::ProcessorParameterSetValueTag {}); if (did_change_value) did_change_value(value); } @@ -151,14 +151,14 @@ public: } template<> -struct AK::Formatter : AK::StandardFormatter { +struct AK::Formatter : AK::StandardFormatter { Formatter() = default; explicit Formatter(StandardFormatter formatter) : StandardFormatter(formatter) { } - ErrorOr format(FormatBuilder& builder, LibDSP::ProcessorRangeParameter value) + ErrorOr format(FormatBuilder& builder, DSP::ProcessorRangeParameter value) { if (m_mode == Mode::Pointer) { Formatter formatter { *this }; diff --git a/Userland/Libraries/LibDSP/Synthesizers.cpp b/Userland/Libraries/LibDSP/Synthesizers.cpp index 8f719435fc..b2e36ed0a8 100644 --- a/Userland/Libraries/LibDSP/Synthesizers.cpp +++ b/Userland/Libraries/LibDSP/Synthesizers.cpp @@ -14,10 +14,10 @@ #include #include -namespace LibDSP::Synthesizers { +namespace DSP::Synthesizers { Classic::Classic(NonnullRefPtr transport) - : LibDSP::SynthesizerProcessor(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) diff --git a/Userland/Libraries/LibDSP/Synthesizers.h b/Userland/Libraries/LibDSP/Synthesizers.h index 9453e97f5c..58e205c727 100644 --- a/Userland/Libraries/LibDSP/Synthesizers.h +++ b/Userland/Libraries/LibDSP/Synthesizers.h @@ -12,7 +12,7 @@ #include #include -namespace LibDSP::Synthesizers { +namespace DSP::Synthesizers { enum Waveform : u8 { Sine, diff --git a/Userland/Libraries/LibDSP/Track.cpp b/Userland/Libraries/LibDSP/Track.cpp index 160df426c0..f0e33c031d 100644 --- a/Userland/Libraries/LibDSP/Track.cpp +++ b/Userland/Libraries/LibDSP/Track.cpp @@ -14,7 +14,7 @@ #include #include -namespace LibDSP { +namespace DSP { bool Track::add_processor(NonnullRefPtr new_processor) { diff --git a/Userland/Libraries/LibDSP/Track.h b/Userland/Libraries/LibDSP/Track.h index f7a484e175..58d7af134c 100644 --- a/Userland/Libraries/LibDSP/Track.h +++ b/Userland/Libraries/LibDSP/Track.h @@ -13,7 +13,7 @@ #include #include -namespace LibDSP { +namespace DSP { // A track is also known as a channel and serves as a container for the audio pipeline: clips -> processors -> mixing & output class Track : public RefCounted { diff --git a/Userland/Libraries/LibDSP/Transport.h b/Userland/Libraries/LibDSP/Transport.h index 23723e27c5..05df46435e 100644 --- a/Userland/Libraries/LibDSP/Transport.h +++ b/Userland/Libraries/LibDSP/Transport.h @@ -10,7 +10,7 @@ #include #include -namespace LibDSP { +namespace DSP { // The DAW-wide timekeeper and synchronizer class Transport final : public RefCounted { diff --git a/Userland/Libraries/LibDSP/Window.h b/Userland/Libraries/LibDSP/Window.h index 6ca47b17d6..72b369ab24 100644 --- a/Userland/Libraries/LibDSP/Window.h +++ b/Userland/Libraries/LibDSP/Window.h @@ -9,7 +9,7 @@ #include #include -namespace LibDSP { +namespace DSP { template class Window final {