-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1324568 - Implement AudioScheduledSourceNode, r=padenot
- Loading branch information
Showing
14 changed files
with
147 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | ||
/* vim:set ts=2 sw=2 sts=2 et cindent: */ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "AudioScheduledSourceNode.h" | ||
#include "mozilla/dom/AudioScheduledSourceNodeBinding.h" | ||
|
||
namespace mozilla { | ||
namespace dom { | ||
|
||
AudioScheduledSourceNode::AudioScheduledSourceNode(AudioContext* aContext, | ||
uint32_t aChannelCount, | ||
ChannelCountMode aChannelCountMode, | ||
ChannelInterpretation aChannelInterpretation) | ||
: AudioNode(aContext, aChannelCount, aChannelCountMode, | ||
aChannelInterpretation) | ||
{} | ||
|
||
JSObject* | ||
AudioScheduledSourceNode::WrapObject(JSContext* aCx, | ||
JS::Handle<JSObject*> aGivenProto) | ||
{ | ||
return AudioScheduledSourceNodeBinding::Wrap(aCx, this, aGivenProto); | ||
} | ||
|
||
} // dom namespace | ||
} // mozilla namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | ||
/* vim:set ts=2 sw=2 sts=2 et cindent: */ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#ifndef AudioScheduledSourceNode_h_ | ||
#define AudioScheduledSourceNode_h_ | ||
|
||
#include "AudioNode.h" | ||
#include "mozilla/dom/AudioScheduledSourceNodeBinding.h" | ||
|
||
namespace mozilla { | ||
namespace dom { | ||
|
||
class AudioContext; | ||
|
||
class AudioScheduledSourceNode : public AudioNode | ||
{ | ||
public: | ||
JSObject* WrapObject(JSContext* aCx, | ||
JS::Handle<JSObject*> aGivenProto) override; | ||
|
||
virtual void Start(double aWhen, ErrorResult& aRv) = 0; | ||
virtual void Stop(double aWhen, ErrorResult& aRv) = 0; | ||
|
||
IMPL_EVENT_HANDLER(ended) | ||
|
||
protected: | ||
AudioScheduledSourceNode(AudioContext* aContext, | ||
uint32_t aChannelCount, | ||
ChannelCountMode aChannelCountMode, | ||
ChannelInterpretation aChannelInterpretation); | ||
virtual ~AudioScheduledSourceNode() = default; | ||
}; | ||
|
||
} // namespace dom | ||
} // namespace mozilla | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. | ||
* | ||
* The origin of this IDL file is | ||
* https://webaudio.github.io/web-audio-api/#idl-def-AudioScheduledSourceNode | ||
* | ||
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C | ||
* liability, trademark and document use rules apply. | ||
*/ | ||
|
||
interface AudioScheduledSourceNode : AudioNode { | ||
attribute EventHandler onended; | ||
[Throws, UnsafeInPrerendering] | ||
void start (optional double when = 0); | ||
|
||
[Throws, UnsafeInPrerendering] | ||
void stop (optional double when = 0); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.