1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 20:37:34 +00:00

Everywhere: rename 'Sample' type to 'Frame'

Because it's what it really is. A frame is composed of 1 or more samples, in
the case of SerenityOS 2 (stereo). This will make it less confusing for
future mantainability.
This commit is contained in:
Cesar Torres 2021-03-19 22:15:54 +01:00 committed by Andreas Kling
parent f4bd095aa3
commit 0d5e1e9df1
7 changed files with 36 additions and 36 deletions

View file

@ -42,7 +42,7 @@ public:
explicit Track(const u32& time);
~Track();
const Vector<Audio::Sample>& recorded_sample() const { return m_recorded_sample; }
const Vector<Audio::Frame>& recorded_sample() const { return m_recorded_sample; }
const SinglyLinkedList<RollNote>& roll_notes(int note) const { return m_roll_notes[note]; }
int wave() const { return m_wave; }
int attack() const { return m_attack; }
@ -65,19 +65,19 @@ public:
void set_delay(int delay);
private:
Audio::Sample sine(size_t note);
Audio::Sample saw(size_t note);
Audio::Sample square(size_t note);
Audio::Sample triangle(size_t note);
Audio::Sample noise() const;
Audio::Sample recorded_sample(size_t note);
Audio::Frame sine(size_t note);
Audio::Frame saw(size_t note);
Audio::Frame square(size_t note);
Audio::Frame triangle(size_t note);
Audio::Frame noise() const;
Audio::Frame recorded_sample(size_t note);
void sync_roll(int note);
void set_sustain_impl(int sustain);
Vector<Sample> m_delay_buffer;
Vector<Audio::Sample> m_recorded_sample;
Vector<Audio::Frame> m_recorded_sample;
u8 m_note_on[note_count] { 0 };
double m_power[note_count] { 0 };