Line data Source code
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 AudioScheduledSourceNode_h_
8 : #define AudioScheduledSourceNode_h_
9 :
10 : #include "AudioNode.h"
11 : #include "mozilla/dom/AudioScheduledSourceNodeBinding.h"
12 :
13 : namespace mozilla {
14 : namespace dom {
15 :
16 : class AudioContext;
17 :
18 : class AudioScheduledSourceNode : public AudioNode
19 : {
20 : public:
21 : JSObject* WrapObject(JSContext* aCx,
22 : JS::Handle<JSObject*> aGivenProto) override;
23 :
24 : virtual void Start(double aWhen, ErrorResult& aRv) = 0;
25 : virtual void Stop(double aWhen, ErrorResult& aRv) = 0;
26 :
27 0 : IMPL_EVENT_HANDLER(ended)
28 :
29 : protected:
30 : AudioScheduledSourceNode(AudioContext* aContext,
31 : uint32_t aChannelCount,
32 : ChannelCountMode aChannelCountMode,
33 : ChannelInterpretation aChannelInterpretation);
34 0 : virtual ~AudioScheduledSourceNode() = default;
35 : };
36 :
37 : } // namespace dom
38 : } // namespace mozilla
39 :
40 : #endif
|