зеркало из https://github.com/mozilla/gecko-dev.git
bug 1205540 provide querying whether engines need to continue processing even without input r=padenot
--HG-- extra : rebase_source : 76545deae4cdc929f1b3ce4d10065f99f21a2ec3
This commit is contained in:
Родитель
e182c00028
Коммит
ee25bfb081
|
@ -83,6 +83,11 @@ public:
|
|||
NS_DispatchToMainThread(transfer);
|
||||
}
|
||||
|
||||
virtual bool IsActive() const override
|
||||
{
|
||||
return mChunksToProcess != 0;
|
||||
}
|
||||
|
||||
virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override
|
||||
{
|
||||
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
|
||||
|
|
|
@ -508,6 +508,12 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual bool IsActive() const override
|
||||
{
|
||||
// Whether buffer has been set and start() has been called.
|
||||
return mBufferSampleRate != 0;
|
||||
}
|
||||
|
||||
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override
|
||||
{
|
||||
// Not owned:
|
||||
|
|
|
@ -112,6 +112,14 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual bool IsActive() const override
|
||||
{
|
||||
// Keep processing to track stream time, which is used for all timelines
|
||||
// associated with the same AudioContext.
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
class OnCompleteTask final : public nsRunnable
|
||||
{
|
||||
public:
|
||||
|
@ -255,6 +263,16 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual bool IsActive() const override
|
||||
{
|
||||
// Keep processing to track stream time, which is used for all timelines
|
||||
// associated with the same AudioContext. If there are no other engines
|
||||
// for the AudioContext, then this could return false to suspend the
|
||||
// stream, but the stream is blocked anyway through
|
||||
// AudioDestinationNode::SetIsOnlyNodeForContext().
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void SetDoubleParameter(uint32_t aIndex, double aParam) override
|
||||
{
|
||||
if (aIndex == VOLUME) {
|
||||
|
|
|
@ -346,6 +346,12 @@ public:
|
|||
OutputChunks& aOutput,
|
||||
bool* aFinished);
|
||||
|
||||
// IsActive() returns true if the engine needs to continue processing an
|
||||
// unfinished stream even when it has silent or no input connections. This
|
||||
// includes tail-times and when sources have been scheduled to start. If
|
||||
// returning false, then the stream can be suspended.
|
||||
virtual bool IsActive() const { return false; }
|
||||
|
||||
bool HasNode() const
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
|
|
@ -211,6 +211,11 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual bool IsActive() const override
|
||||
{
|
||||
return !mBiquads.IsEmpty();
|
||||
}
|
||||
|
||||
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override
|
||||
{
|
||||
// Not owned:
|
||||
|
|
|
@ -154,6 +154,11 @@ public:
|
|||
mReverb->process(&input, aOutput, WEBAUDIO_BLOCK_SIZE);
|
||||
}
|
||||
|
||||
virtual bool IsActive() const override
|
||||
{
|
||||
return mLeftOverData != INT32_MIN;
|
||||
}
|
||||
|
||||
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override
|
||||
{
|
||||
size_t amount = AudioNodeEngine::SizeOfExcludingThis(aMallocSizeOf);
|
||||
|
|
|
@ -161,6 +161,11 @@ public:
|
|||
mHaveProducedBeforeInput = true;
|
||||
}
|
||||
|
||||
virtual bool IsActive() const override
|
||||
{
|
||||
return mLeftOverData != INT32_MIN;
|
||||
}
|
||||
|
||||
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override
|
||||
{
|
||||
size_t amount = AudioNodeEngine::SizeOfExcludingThis(aMallocSizeOf);
|
||||
|
|
|
@ -330,6 +330,12 @@ public:
|
|||
|
||||
}
|
||||
|
||||
virtual bool IsActive() const override
|
||||
{
|
||||
// start() has been called.
|
||||
return mStart != -1;
|
||||
}
|
||||
|
||||
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override
|
||||
{
|
||||
size_t amount = AudioNodeEngine::SizeOfExcludingThis(aMallocSizeOf);
|
||||
|
|
|
@ -172,6 +172,11 @@ public:
|
|||
(this->*mPanningModelFunction)(aInput, aOutput);
|
||||
}
|
||||
|
||||
virtual bool IsActive() const override
|
||||
{
|
||||
return mLeftOverData != INT_MIN;
|
||||
}
|
||||
|
||||
void ComputeAzimuthAndElevation(float& aAzimuth, float& aElevation);
|
||||
float ComputeConeGain();
|
||||
// Compute how much the distance contributes to the gain reduction.
|
||||
|
|
|
@ -333,6 +333,14 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual bool IsActive() const override
|
||||
{
|
||||
// Could return false when !mIsConnected after all output chunks produced
|
||||
// by main thread events calling
|
||||
// SharedBuffers::FinishProducingOutputBuffer() have been processed.
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override
|
||||
{
|
||||
// Not owned:
|
||||
|
|
Загрузка…
Ссылка в новой задаче