| 
									
										
										
										
											2024-07-24 16:44:49 +12:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * Copyright (c) 2024, Shannon Booth <shannon@serenityos.org> | 
					
						
							| 
									
										
										
										
											2024-07-27 16:38:09 +03:00
										 |  |  |  * Copyright (c) 2024, Bar Yemini <bar.ye651@gmail.com> | 
					
						
							| 
									
										
										
										
											2024-07-24 16:44:49 +12:00
										 |  |  |  * | 
					
						
							|  |  |  |  * SPDX-License-Identifier: BSD-2-Clause | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #pragma once
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-27 16:38:09 +03:00
										 |  |  | #include <LibWeb/Bindings/AudioDestinationNodePrototype.h>
 | 
					
						
							| 
									
										
										
										
											2024-07-24 16:44:49 +12:00
										 |  |  | #include <LibWeb/WebAudio/AudioNode.h>
 | 
					
						
							| 
									
										
										
										
											2024-07-27 16:38:09 +03:00
										 |  |  | #include <LibWeb/WebAudio/BaseAudioContext.h>
 | 
					
						
							|  |  |  | #include <LibWeb/WebIDL/Types.h>
 | 
					
						
							| 
									
										
										
										
											2024-07-24 16:44:49 +12:00
										 |  |  | 
 | 
					
						
							|  |  |  | namespace Web::WebAudio { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // https://webaudio.github.io/web-audio-api/#AudioDestinationNode
 | 
					
						
							|  |  |  | class AudioDestinationNode : public AudioNode { | 
					
						
							|  |  |  |     WEB_PLATFORM_OBJECT(AudioDestinationNode, AudioNode); | 
					
						
							| 
									
										
										
										
											2024-11-15 04:01:23 +13:00
										 |  |  |     GC_DECLARE_ALLOCATOR(AudioDestinationNode); | 
					
						
							| 
									
										
										
										
											2024-07-24 16:44:49 +12:00
										 |  |  | 
 | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     virtual ~AudioDestinationNode() override; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-27 16:38:09 +03:00
										 |  |  |     WebIDL::UnsignedLong max_channel_count(); | 
					
						
							| 
									
										
										
										
											2024-10-08 12:03:50 +02:00
										 |  |  |     WebIDL::UnsignedLong number_of_inputs() override { return 1; } | 
					
						
							|  |  |  |     WebIDL::UnsignedLong number_of_outputs() override { return 1; } | 
					
						
							| 
									
										
										
										
											2024-10-08 13:51:27 +02:00
										 |  |  |     WebIDL::ExceptionOr<void> set_channel_count(WebIDL::UnsignedLong) override; | 
					
						
							| 
									
										
										
										
											2024-07-27 16:38:09 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-15 04:01:23 +13:00
										 |  |  |     static GC::Ref<AudioDestinationNode> construct_impl(JS::Realm&, GC::Ref<BaseAudioContext>); | 
					
						
							| 
									
										
										
										
											2024-07-27 16:38:09 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-24 16:44:49 +12:00
										 |  |  | protected: | 
					
						
							| 
									
										
										
										
											2024-11-15 04:01:23 +13:00
										 |  |  |     AudioDestinationNode(JS::Realm&, GC::Ref<BaseAudioContext>); | 
					
						
							| 
									
										
										
										
											2024-07-24 16:44:49 +12:00
										 |  |  | 
 | 
					
						
							|  |  |  |     virtual void initialize(JS::Realm&) override; | 
					
						
							|  |  |  |     virtual void visit_edges(Cell::Visitor&) override; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } |