Bug 1853598 remove unused control thread / double TimeType GetValuesAtTime() r=padenot

aSize > 1 was not supported.
https://searchfox.org/mozilla-central/rev/b741ddde6c678ca7025858952202d20664491555/dom/media/webaudio/AudioEventTimeline.cpp#127

Depends on D188435

Differential Revision: https://phabricator.services.mozilla.com/D188436
This commit is contained in:
Karl Tomlinson 2023-09-19 00:08:03 +00:00
parent 1335f329c2
commit 9577662c72
2 changed files with 6 additions and 16 deletions

View File

@ -325,11 +325,12 @@ class AudioEventTimeline {
return result;
}
template <class TimeType>
void GetValuesAtTime(TimeType aTime, float* aBuffer, const size_t aSize) {
void GetValuesAtTime(int64_t aTime, float* aBuffer, const size_t aSize) {
MOZ_ASSERT(aBuffer);
GetValuesAtTimeHelper(aTime, aBuffer, aSize);
}
void GetValuesAtTime(double aTime, float* aBuffer,
const size_t aSize) = delete;
// Return the number of events scheduled
uint32_t GetEventCount() const { return mEvents.Length(); }

View File

@ -59,8 +59,9 @@ class AudioParamTimeline : public AudioEventTimeline {
// otherwise it should always be zero. aSize is meant to be used when
// getting the value of an a-rate AudioParam for each tick inside an
// AudioNodeEngine implementation.
template <class TimeType>
void GetValuesAtTime(TimeType aTime, float* aBuffer, const size_t aSize);
void GetValuesAtTime(int64_t aTime, float* aBuffer, const size_t aSize);
void GetValuesAtTime(double aTime, float* aBuffer,
const size_t aSize) = delete;
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const {
return mTrack ? mTrack->SizeOfIncludingThis(aMallocSizeOf) : 0;
@ -95,18 +96,6 @@ inline float AudioParamTimeline::GetValueAtTime(int64_t aTime) {
(mTrack ? AudioNodeInputValue(0) : 0.0f);
}
template <>
inline void AudioParamTimeline::GetValuesAtTime(double aTime, float* aBuffer,
const size_t aSize) {
MOZ_ASSERT(aBuffer);
MOZ_ASSERT(aSize == 1);
// Getting an AudioParam value on an AudioNode does not consider input from
// other AudioNodes, which is managed only on the graph thread.
*aBuffer = BaseClass::GetValueAtTime(aTime);
}
template <>
inline void AudioParamTimeline::GetValuesAtTime(int64_t aTime, float* aBuffer,
const size_t aSize) {
MOZ_ASSERT(aBuffer);