2012-09-18 23:07:33 +00:00
|
|
|
/* -*- 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 "AudioDestinationNode.h"
|
|
|
|
#include "mozilla/dom/AudioDestinationNodeBinding.h"
|
2013-02-04 23:07:25 +00:00
|
|
|
#include "AudioNodeEngine.h"
|
|
|
|
#include "AudioNodeStream.h"
|
|
|
|
#include "MediaStreamGraph.h"
|
2012-09-18 23:07:33 +00:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2013-04-15 01:52:55 +00:00
|
|
|
NS_IMPL_ISUPPORTS_INHERITED0(AudioDestinationNode, AudioNode)
|
2013-02-12 16:42:59 +00:00
|
|
|
|
2013-02-04 23:07:25 +00:00
|
|
|
AudioDestinationNode::AudioDestinationNode(AudioContext* aContext, MediaStreamGraph* aGraph)
|
2013-04-27 22:44:50 +00:00
|
|
|
: AudioNode(aContext,
|
|
|
|
2,
|
|
|
|
ChannelCountMode::Explicit,
|
|
|
|
ChannelInterpretation::Speakers)
|
2012-09-18 23:07:33 +00:00
|
|
|
{
|
2013-04-20 16:16:28 +00:00
|
|
|
mStream = aGraph->CreateAudioNodeStream(new AudioNodeEngine(this),
|
2013-03-18 00:37:47 +00:00
|
|
|
MediaStreamGraph::EXTERNAL_STREAM);
|
2012-09-18 23:07:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
JSObject*
|
2013-04-25 16:29:54 +00:00
|
|
|
AudioDestinationNode::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
|
2012-09-18 23:07:33 +00:00
|
|
|
{
|
2013-03-11 23:03:47 +00:00
|
|
|
return AudioDestinationNodeBinding::Wrap(aCx, aScope, this);
|
2012-09-18 23:07:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|