1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:07:44 +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:
kleines Filmröllchen 2022-07-17 11:35:31 +02:00 committed by Linus Groh
parent 3f59356c79
commit 00e13b5b27
36 changed files with 92 additions and 92 deletions

View file

@ -6,7 +6,7 @@
#include "Clip.h"
namespace LibDSP {
namespace DSP {
Sample AudioClip::sample_at(u32 time)
{

View file

@ -11,7 +11,7 @@
#include <AK/Types.h>
#include <LibDSP/Music.h>
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<Clip> {

View file

@ -8,7 +8,7 @@
#include <AK/FixedArray.h>
#include <math.h>
namespace LibDSP::Effects {
namespace DSP::Effects {
Delay::Delay(NonnullRefPtr<Transport> transport)
: EffectProcessor(move(transport))

View file

@ -11,7 +11,7 @@
#include <LibDSP/ProcessorParameter.h>
#include <LibDSP/Transport.h>
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.

View file

@ -8,7 +8,7 @@
#include <AK/StdLibExtras.h>
namespace LibDSP {
namespace DSP {
// For now, this cannot be optimal as clang doesn't know underlying type specifications.
enum EnvelopeState {

View file

@ -10,7 +10,7 @@
#include <AK/Math.h>
#include <AK/Span.h>
namespace LibDSP {
namespace DSP {
constexpr void fft(Span<Complex<float>> sample_data, bool invert = false)
{

View file

@ -9,7 +9,7 @@
#include <AK/Error.h>
#include <AK/NumericLimits.h>
namespace LibDSP {
namespace DSP {
void Keyboard::set_keyboard_note(u8 pitch, Keyboard::Switch note_switch)
{

View file

@ -11,7 +11,7 @@
#include <LibDSP/Music.h>
#include <LibDSP/Transport.h>
namespace LibDSP {
namespace DSP {
class Keyboard : public RefCounted<Keyboard> {

View file

@ -10,7 +10,7 @@
#include <AK/Math.h>
#include <AK/Span.h>
namespace LibDSP {
namespace DSP {
template<size_t N>
requires(N % 2 == 0) class MDCT {

View file

@ -15,7 +15,7 @@
#include <LibAudio/Sample.h>
#include <LibDSP/Envelope.h>
namespace LibDSP {
namespace DSP {
using Sample = Audio::Sample;

View file

@ -17,7 +17,7 @@
#include <LibDSP/ProcessorParameter.h>
#include <LibDSP/Transport.h>
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<Processor> {

View file

@ -14,7 +14,7 @@
#include <AK/Types.h>
#include <LibDSP/Music.h>
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<LibDSP::ProcessorRangeParameter> : AK::StandardFormatter {
struct AK::Formatter<DSP::ProcessorRangeParameter> : AK::StandardFormatter {
Formatter() = default;
explicit Formatter(StandardFormatter formatter)
: StandardFormatter(formatter)
{
}
ErrorOr<void> format(FormatBuilder& builder, LibDSP::ProcessorRangeParameter value)
ErrorOr<void> format(FormatBuilder& builder, DSP::ProcessorRangeParameter value)
{
if (m_mode == Mode::Pointer) {
Formatter<FlatPtr> formatter { *this };

View file

@ -14,10 +14,10 @@
#include <LibDSP/Processor.h>
#include <LibDSP/Synthesizers.h>
namespace LibDSP::Synthesizers {
namespace DSP::Synthesizers {
Classic::Classic(NonnullRefPtr<Transport> 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)

View file

@ -12,7 +12,7 @@
#include <LibDSP/ProcessorParameter.h>
#include <LibDSP/Transport.h>
namespace LibDSP::Synthesizers {
namespace DSP::Synthesizers {
enum Waveform : u8 {
Sine,

View file

@ -14,7 +14,7 @@
#include <LibDSP/Processor.h>
#include <LibDSP/Track.h>
namespace LibDSP {
namespace DSP {
bool Track::add_processor(NonnullRefPtr<Processor> new_processor)
{

View file

@ -13,7 +13,7 @@
#include <LibDSP/Music.h>
#include <LibDSP/Processor.h>
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<Track> {

View file

@ -10,7 +10,7 @@
#include <AK/Types.h>
#include <LibDSP/Music.h>
namespace LibDSP {
namespace DSP {
// The DAW-wide timekeeper and synchronizer
class Transport final : public RefCounted<Transport> {

View file

@ -9,7 +9,7 @@
#include <AK/FixedArray.h>
#include <AK/Math.h>
namespace LibDSP {
namespace DSP {
template<typename T>
class Window final {