LibWeb: Add BaseAudioContext::nyquist_frequency helper function

As a convenient shorthand :^)
This commit is contained in:
Shannon Booth 2024-05-01 21:28:16 +12:00 committed by Andreas Kling
commit 303958a803
Notes: sideshowbarker 2024-07-17 18:08:55 +09:00

View file

@ -35,6 +35,9 @@ public:
double current_time() const { return m_current_time; }
Bindings::AudioContextState state() const { return m_control_thread_state; }
// https://webaudio.github.io/web-audio-api/#--nyquist-frequency
float nyquist_frequency() const { return m_sample_rate / 2; }
void set_onstatechange(WebIDL::CallbackType*);
WebIDL::CallbackType* onstatechange();