gecko-dev/content/media/webaudio/DelayNode.h
Karl Tomlinson 09a7376680 b=932400 change stream ordering to get feedback DelayNode output before supplying input r=roc
Previously downstream nodes from DelayNodes in cycles sometimes received stale
output from the previous MSG iteration.

Also, if two cycles share a common path, they will now *both* be treated as
cycles, either by muting or by enforcing minimum delay.  Previously, marking
one cycle first could prevent detection of other cycles in the same SCC.

--HG--
extra : rebase_source : 82892c538c5ce514165b5f975474df15b99e3d2b
2014-07-17 12:55:55 +12:00

57 lines
1.2 KiB
C++

/* -*- 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 DelayNode_h_
#define DelayNode_h_
#include "AudioNode.h"
#include "AudioParam.h"
namespace mozilla {
namespace dom {
class AudioContext;
class DelayNode : public AudioNode
{
public:
DelayNode(AudioContext* aContext, double aMaxDelay);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(DelayNode, AudioNode)
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
AudioParam* DelayTime() const
{
return mDelay;
}
virtual const char* NodeType() const
{
return "DelayNode";
}
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
protected:
virtual ~DelayNode();
private:
static void SendDelayToStream(AudioNode* aNode);
friend class DelayNodeEngine;
private:
nsRefPtr<AudioParam> mDelay;
};
}
}
#endif