LibWeb: Add a stubbed slot for DynamicsCompressorNode.reduction

For now, this slot is always 0 - (the default value per spec). But
once we start actually processing audio streams this internal slot
should be changed correspondingly.
This commit is contained in:
Shannon Booth 2024-05-11 20:39:46 +12:00 committed by Andreas Kling
commit 3ccbc83168
Notes: sideshowbarker 2024-07-16 17:12:03 +09:00
4 changed files with 9 additions and 1 deletions

View file

@ -35,6 +35,7 @@ public:
JS::NonnullGCPtr<AudioParam const> ratio() const { return m_ratio; }
JS::NonnullGCPtr<AudioParam const> attack() const { return m_attack; }
JS::NonnullGCPtr<AudioParam const> release() const { return m_release; }
float reduction() const { return m_reduction; }
protected:
DynamicsCompressorNode(JS::Realm&, JS::NonnullGCPtr<BaseAudioContext>, DynamicsCompressorOptions const& = {});
@ -57,6 +58,9 @@ private:
// https://webaudio.github.io/web-audio-api/#dom-dynamicscompressornode-release
JS::NonnullGCPtr<AudioParam> m_release;
// https://webaudio.github.io/web-audio-api/#dom-dynamicscompressornode-internal-reduction-slot
float m_reduction { 0 }; // [[internal reduction]]
};
}