mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb: Implement BaseAudioContext.createBuffer
This is a simple factory function which effectively just calls the AudioBuffer constructor.
This commit is contained in:
parent
17ae65cedc
commit
71ccd8ad25
Notes:
sideshowbarker
2024-07-17 06:35:16 +09:00
Author: https://github.com/shannonbooth
Commit: 71ccd8ad25
Pull-request: https://github.com/SerenityOS/serenity/pull/24447
6 changed files with 19 additions and 1 deletions
|
@ -18,6 +18,11 @@ namespace Web::WebAudio {
|
|||
|
||||
JS_DEFINE_ALLOCATOR(AudioBuffer);
|
||||
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<AudioBuffer>> AudioBuffer::create(JS::Realm& realm, WebIDL::UnsignedLong number_of_channels, WebIDL::UnsignedLong length, float sample_rate)
|
||||
{
|
||||
return construct_impl(realm, { number_of_channels, length, sample_rate });
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<AudioBuffer>> AudioBuffer::construct_impl(JS::Realm& realm, AudioBufferOptions const& options)
|
||||
{
|
||||
auto& vm = realm.vm();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue