mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 06:09:08 +00:00
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:
parent
cf615cbd1c
commit
3ccbc83168
Notes:
sideshowbarker
2024-07-16 17:12:03 +09:00
Author: https://github.com/shannonbooth
Commit: 3ccbc83168
Pull-request: https://github.com/SerenityOS/serenity/pull/24351
4 changed files with 9 additions and 1 deletions
|
@ -7,3 +7,4 @@ Object
|
||||||
[object AudioParam] current: 12, default: 12, min: 1, max: 20, rate: k-rate
|
[object AudioParam] current: 12, default: 12, min: 1, max: 20, rate: k-rate
|
||||||
[object AudioParam] current: 0.003000000026077032, default: 0.003000000026077032, min: 0, max: 1, rate: k-rate
|
[object AudioParam] current: 0.003000000026077032, default: 0.003000000026077032, min: 0, max: 1, rate: k-rate
|
||||||
[object AudioParam] current: 0.25, default: 0.25, min: 0, max: 1, rate: k-rate
|
[object AudioParam] current: 0.25, default: 0.25, min: 0, max: 1, rate: k-rate
|
||||||
|
reduction: 0
|
||||||
|
|
|
@ -23,5 +23,8 @@
|
||||||
dumpAudioParam(compressor.ratio);
|
dumpAudioParam(compressor.ratio);
|
||||||
dumpAudioParam(compressor.attack);
|
dumpAudioParam(compressor.attack);
|
||||||
dumpAudioParam(compressor.release);
|
dumpAudioParam(compressor.release);
|
||||||
|
|
||||||
|
// Default reduction
|
||||||
|
println(`reduction: ${compressor.reduction}`);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -35,6 +35,7 @@ public:
|
||||||
JS::NonnullGCPtr<AudioParam const> ratio() const { return m_ratio; }
|
JS::NonnullGCPtr<AudioParam const> ratio() const { return m_ratio; }
|
||||||
JS::NonnullGCPtr<AudioParam const> attack() const { return m_attack; }
|
JS::NonnullGCPtr<AudioParam const> attack() const { return m_attack; }
|
||||||
JS::NonnullGCPtr<AudioParam const> release() const { return m_release; }
|
JS::NonnullGCPtr<AudioParam const> release() const { return m_release; }
|
||||||
|
float reduction() const { return m_reduction; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
DynamicsCompressorNode(JS::Realm&, JS::NonnullGCPtr<BaseAudioContext>, DynamicsCompressorOptions const& = {});
|
DynamicsCompressorNode(JS::Realm&, JS::NonnullGCPtr<BaseAudioContext>, DynamicsCompressorOptions const& = {});
|
||||||
|
@ -57,6 +58,9 @@ private:
|
||||||
|
|
||||||
// https://webaudio.github.io/web-audio-api/#dom-dynamicscompressornode-release
|
// https://webaudio.github.io/web-audio-api/#dom-dynamicscompressornode-release
|
||||||
JS::NonnullGCPtr<AudioParam> m_release;
|
JS::NonnullGCPtr<AudioParam> m_release;
|
||||||
|
|
||||||
|
// https://webaudio.github.io/web-audio-api/#dom-dynamicscompressornode-internal-reduction-slot
|
||||||
|
float m_reduction { 0 }; // [[internal reduction]]
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ interface DynamicsCompressorNode : AudioNode {
|
||||||
readonly attribute AudioParam threshold;
|
readonly attribute AudioParam threshold;
|
||||||
readonly attribute AudioParam knee;
|
readonly attribute AudioParam knee;
|
||||||
readonly attribute AudioParam ratio;
|
readonly attribute AudioParam ratio;
|
||||||
// FIXME: readonly attribute float reduction;
|
readonly attribute float reduction;
|
||||||
readonly attribute AudioParam attack;
|
readonly attribute AudioParam attack;
|
||||||
readonly attribute AudioParam release;
|
readonly attribute AudioParam release;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue