PeriodicWave.cpp 975 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibWeb/Bindings/Intrinsics.h>
  7. #include <LibWeb/Bindings/PeriodicWavePrototype.h>
  8. #include <LibWeb/WebAudio/PeriodicWave.h>
  9. #include <LibWeb/WebIDL/ExceptionOr.h>
  10. namespace Web::WebAudio {
  11. JS_DEFINE_ALLOCATOR(PeriodicWave);
  12. // https://webaudio.github.io/web-audio-api/#dom-periodicwave-periodicwave
  13. WebIDL::ExceptionOr<JS::NonnullGCPtr<PeriodicWave>> PeriodicWave::construct_impl(JS::Realm& realm, JS::NonnullGCPtr<BaseAudioContext>, PeriodicWaveOptions const&)
  14. {
  15. return WebIDL::NotSupportedError::create(realm, "FIXME: Implement PeriodicWave::construct_impl"_fly_string);
  16. }
  17. PeriodicWave::~PeriodicWave() = default;
  18. void PeriodicWave::initialize(JS::Realm& realm)
  19. {
  20. Base::initialize(realm);
  21. WEB_SET_PROTOTYPE_FOR_INTERFACE(PeriodicWave);
  22. }
  23. void PeriodicWave::visit_edges(Cell::Visitor& visitor)
  24. {
  25. Base::visit_edges(visitor);
  26. }
  27. }