mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 02:29:21 +00:00
LibWeb: Implement AudioNode.channelCount
This commit is contained in:
parent
7b4f0d13ee
commit
cb21201550
Notes:
github-actions[bot]
2024-10-08 14:35:10 +00:00
Author: https://github.com/gmta
Commit: cb21201550
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1679
4 changed files with 35 additions and 10 deletions
|
@ -101,15 +101,13 @@ void AudioNode::disconnect(JS::NonnullGCPtr<AudioParam> destination_param, WebID
|
|||
// https://webaudio.github.io/web-audio-api/#dom-audionode-channelcount
|
||||
WebIDL::ExceptionOr<void> AudioNode::set_channel_count(WebIDL::UnsignedLong channel_count)
|
||||
{
|
||||
(void)channel_count;
|
||||
return WebIDL::NotSupportedError::create(realm(), "FIXME: Implement AudioNode::set_channel_count(channel_count)"_fly_string);
|
||||
}
|
||||
// If this value is set to zero or to a value greater than the implementation’s maximum number
|
||||
// of channels the implementation MUST throw a NotSupportedError exception.
|
||||
if (channel_count == 0 || channel_count > BaseAudioContext::MAX_NUMBER_OF_CHANNELS)
|
||||
return WebIDL::NotSupportedError::create(realm(), "Invalid channel count"_fly_string);
|
||||
|
||||
// https://webaudio.github.io/web-audio-api/#dom-audionode-channelcount
|
||||
WebIDL::UnsignedLong AudioNode::channel_count()
|
||||
{
|
||||
dbgln("FIXME: Implement AudioNode::channel_count()");
|
||||
return 2;
|
||||
m_channel_count = channel_count;
|
||||
return {};
|
||||
}
|
||||
|
||||
// https://webaudio.github.io/web-audio-api/#dom-audionode-channelcountmode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue