1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4  * License, v. 2.0. If a copy of the MPL was not distributed with this
5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 
7 #ifndef ChannelMergerNode_h_
8 #define ChannelMergerNode_h_
9 
10 #include "AudioNode.h"
11 
12 namespace mozilla {
13 namespace dom {
14 
15 class AudioContext;
16 
17 class ChannelMergerNode final : public AudioNode
18 {
19 public:
20   ChannelMergerNode(AudioContext* aContext,
21                     uint16_t aInputCount);
22 
23   NS_DECL_ISUPPORTS_INHERITED
24 
25   JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
26 
NumberOfInputs()27   uint16_t NumberOfInputs() const override { return mInputCount; }
28 
NodeType()29   const char* NodeType() const override
30   {
31     return "ChannelMergerNode";
32   }
33 
SizeOfIncludingThis(MallocSizeOf aMallocSizeOf)34   size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override
35   {
36     return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
37   }
38 
39 protected:
40   virtual ~ChannelMergerNode();
41 
42 private:
43   const uint16_t mInputCount;
44 };
45 
46 } // namespace dom
47 } // namespace mozilla
48 
49 #endif
50 
51