Coverage Report

Created: 2025-12-18 07:52

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/serenity/Userland/Libraries/LibWeb/WebAudio/AudioDestinationNode.h
Line
Count
Source
1
/*
2
 * Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
3
 * Copyright (c) 2024, Bar Yemini <bar.ye651@gmail.com>
4
 *
5
 * SPDX-License-Identifier: BSD-2-Clause
6
 */
7
8
#pragma once
9
10
#include <LibWeb/Bindings/AudioDestinationNodePrototype.h>
11
#include <LibWeb/WebAudio/AudioNode.h>
12
#include <LibWeb/WebAudio/BaseAudioContext.h>
13
#include <LibWeb/WebIDL/Types.h>
14
15
namespace Web::WebAudio {
16
17
// https://webaudio.github.io/web-audio-api/#AudioDestinationNode
18
class AudioDestinationNode : public AudioNode {
19
    WEB_PLATFORM_OBJECT(AudioDestinationNode, AudioNode);
20
    JS_DECLARE_ALLOCATOR(AudioDestinationNode);
21
22
public:
23
    virtual ~AudioDestinationNode() override;
24
25
    WebIDL::UnsignedLong max_channel_count();
26
0
    WebIDL::UnsignedLong number_of_inputs() override { return 1; }
27
0
    WebIDL::UnsignedLong number_of_outputs() override { return 1; }
28
    WebIDL::ExceptionOr<void> set_channel_count(WebIDL::UnsignedLong) override;
29
30
    static JS::NonnullGCPtr<AudioDestinationNode> construct_impl(JS::Realm&, JS::NonnullGCPtr<BaseAudioContext>);
31
32
protected:
33
    AudioDestinationNode(JS::Realm&, JS::NonnullGCPtr<BaseAudioContext>);
34
35
    virtual void initialize(JS::Realm&) override;
36
    virtual void visit_edges(Cell::Visitor&) override;
37
};
38
39
}