Bug 1403041 - Fix typo in AudioCallbackDriver member. r?kinetik
s/mOuputChannelCount/mOutputChannelCount/
MozReview-Commit-ID: Kv03aSKnfQa
--- a/dom/media/GraphDriver.cpp
+++ b/dom/media/GraphDriver.cpp
@@ -563,19 +563,19 @@ StreamAndPromiseForOperation::StreamAndP
, mPromise(aPromise)
, mOperation(aOperation)
{
// MOZ_ASSERT(aPromise);
}
AudioCallbackDriver::AudioCallbackDriver(MediaStreamGraphImpl* aGraphImpl)
: GraphDriver(aGraphImpl)
- , mOuputChannels(mGraphImpl->AudioChannelCount())
- , mScratchBuffer(std::max<uint32_t>(1, mOuputChannels))
- , mBuffer(std::max<uint32_t>(1, mOuputChannels))
+ , mOutputChannels(mGraphImpl->AudioChannelCount())
+ , mScratchBuffer(std::max<uint32_t>(1, mOutputChannels))
+ , mBuffer(std::max<uint32_t>(1, mOutputChannels))
, mSampleRate(0)
, mInputChannels(1)
, mIterationDurationMS(MEDIA_GRAPH_TARGET_PERIOD_MS)
, mStarted(false)
, mAudioInput(nullptr)
, mAddedMixer(false)
, mInCallback(false)
, mMicrophoneActive(false)
@@ -648,17 +648,17 @@ AudioCallbackDriver::Init()
mSampleRate = output.rate = CubebUtils::PreferredSampleRate();
if (AUDIO_OUTPUT_FORMAT == AUDIO_FORMAT_S16) {
output.format = CUBEB_SAMPLE_S16NE;
} else {
output.format = CUBEB_SAMPLE_FLOAT32NE;
}
- output.channels = mOuputChannels;
+ output.channels = mOutputChannels;
output.layout = CUBEB_LAYOUT_UNDEFINED;
Maybe<uint32_t> latencyPref = CubebUtils::GetCubebMSGLatencyInFrames();
if (latencyPref) {
latency_frames = latencyPref.value();
} else {
if (cubeb_get_min_latency(cubebContext, &output, &latency_frames) != CUBEB_OK) {
NS_WARNING("Could not get minimal latency from cubeb.");
@@ -949,17 +949,17 @@ AudioCallbackDriver::DataCallback(const
GraphTime stateComputedTime = StateComputedTime();
if (stateComputedTime == 0) {
MonitorAutoLock mon(mGraphImpl->GetMonitor());
// Because this function is called during cubeb_stream_init (to prefill the
// audio buffers), it can be that we don't have a message here (because this
// driver is the first one for this graph), and the graph would exit. Simply
// return here until we have messages.
if (!mGraphImpl->MessagesQueued()) {
- PodZero(aOutputBuffer, aFrames * mOuputChannels);
+ PodZero(aOutputBuffer, aFrames * mOutputChannels);
return aFrames;
}
mGraphImpl->SwapMessageQueues();
}
uint32_t durationMS = aFrames * 1000 / mSampleRate;
// For now, simply average the duration with the previous
@@ -1036,17 +1036,17 @@ AudioCallbackDriver::DataCallback(const
mBuffer.BufferFilled();
// Callback any observers for the AEC speaker data. Note that one
// (maybe) of these will be full-duplex, the others will get their input
// data off separate cubeb callbacks. Take care with how stuff is
// removed/added to this list and TSAN issues, but input and output will
// use separate callback methods.
mGraphImpl->NotifyOutputData(aOutputBuffer, static_cast<size_t>(aFrames),
- mSampleRate, mOuputChannels);
+ mSampleRate, mOutputChannels);
bool switching = false;
{
MonitorAutoLock mon(mGraphImpl->GetMonitor());
switching = !!NextDriver();
}
if (switching && stillProcessing) {
--- a/dom/media/GraphDriver.h
+++ b/dom/media/GraphDriver.h
@@ -448,18 +448,18 @@ public:
}
AudioCallbackDriver* AsAudioCallbackDriver() override {
return this;
}
uint32_t OutputChannelCount()
{
- MOZ_ASSERT(mOuputChannels != 0 && mOuputChannels <= 8);
- return mOuputChannels;
+ MOZ_ASSERT(mOutputChannels != 0 && mOutputChannels <= 8);
+ return mOutputChannels;
}
/* Enqueue a promise that is going to be resolved when a specific operation
* occurs on the cubeb stream. */
void EnqueueStreamAndPromiseForOperation(MediaStream* aStream,
void* aPromise,
dom::AudioContextOperation aOperation);
@@ -488,17 +488,17 @@ private:
/**
* This is called when the output device used by the cubeb stream changes. */
void DeviceChangedCallback();
/* Start the cubeb stream */
bool StartStream();
friend class AsyncCubebTask;
bool Init();
/* MediaStreamGraphs are always down/up mixed to output channels. */
- uint32_t mOuputChannels;
+ uint32_t mOutputChannels;
/* The size of this buffer comes from the fact that some audio backends can
* call back with a number of frames lower than one block (128 frames), so we
* need to keep at most two block in the SpillBuffer, because we always round
* up to block boundaries during an iteration.
* This is only ever accessed on the audio callback thread. */
SpillBuffer<AudioDataValue, WEBAUDIO_BLOCK_SIZE * 2> mScratchBuffer;
/* Wrapper to ensure we write exactly the number of frames we need in the
* audio buffer cubeb passes us. This is only ever accessed on the audio