2012-09-18 16:07:33 -07: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/. */
|
|
|
|
|
2012-10-30 14:39:38 -07:00
|
|
|
#ifndef AudioDestinationNode_h_
|
|
|
|
#define AudioDestinationNode_h_
|
2012-09-18 16:07:33 -07:00
|
|
|
|
|
|
|
#include "AudioNode.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
|
|
|
class AudioContext;
|
|
|
|
|
2013-04-14 18:52:55 -07:00
|
|
|
class AudioDestinationNode : public AudioNode
|
2012-09-18 16:07:33 -07:00
|
|
|
{
|
|
|
|
public:
|
2013-05-16 16:30:42 -07:00
|
|
|
// This node type knows what MediaStreamGraph to use based on
|
|
|
|
// whether it's in offline mode.
|
|
|
|
AudioDestinationNode(AudioContext* aContext,
|
|
|
|
bool aIsOffline,
|
|
|
|
uint32_t aNumberOfChannels = 0,
|
|
|
|
uint32_t aLength = 0,
|
|
|
|
float aSampleRate = 0.0f);
|
2012-09-18 16:07:33 -07:00
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
2013-04-25 09:29:54 -07:00
|
|
|
virtual JSObject* WrapObject(JSContext* aCx,
|
|
|
|
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
|
2012-09-18 16:07:33 -07:00
|
|
|
|
2013-05-05 08:48:45 -07:00
|
|
|
virtual uint16_t NumberOfOutputs() const MOZ_FINAL MOZ_OVERRIDE
|
2012-09-24 20:31:58 -07:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2013-06-10 10:32:28 -07:00
|
|
|
uint32_t MaxChannelCount() const;
|
|
|
|
virtual void SetChannelCount(uint32_t aChannelCount,
|
|
|
|
ErrorResult& aRv) MOZ_OVERRIDE;
|
|
|
|
|
2013-07-03 17:44:32 -07:00
|
|
|
void Mute();
|
|
|
|
void Unmute();
|
|
|
|
|
2013-05-16 16:30:42 -07:00
|
|
|
void StartRendering();
|
|
|
|
|
2013-05-16 16:31:08 -07:00
|
|
|
void DestroyGraph();
|
|
|
|
|
2013-05-16 16:30:42 -07:00
|
|
|
private:
|
|
|
|
uint32_t mFramesToProduce;
|
2012-09-18 16:07:33 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-10-30 14:39:38 -07:00
|
|
|
#endif
|
|
|
|
|