mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-04-19 10:20:22 +00:00
Modeled after UniqueNodeID and uses incremental counter on BaseAudioContext to assign IDs.
29 lines
521 B
C++
29 lines
521 B
C++
/*
|
|
* Copyright (c) 2025-2026, Ben Eidson <b.e.eidson@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Variant.h>
|
|
#include <LibWeb/WebAudio/Types.h>
|
|
|
|
namespace Web::WebAudio {
|
|
|
|
struct StartSource {
|
|
NodeID node_id { 0 };
|
|
double when { 0.0 };
|
|
};
|
|
|
|
struct StopSource {
|
|
NodeID node_id { 0 };
|
|
double when { 0.0 };
|
|
};
|
|
|
|
// FIXME: add more message types
|
|
|
|
// https://webaudio.github.io/web-audio-api/#control-message
|
|
using ControlMessage = Variant<StartSource, StopSource>;
|
|
|
|
}
|