mWaitState is only ever tested against WAITSTATE_WAITING_INDEFINITELY and so
the other values are equivalent. It is never WAITSTATE_WAITING_INDEFINITELY
on leaving (or entering) WaitForNextIteration and so there is no need to set
it in WakeUp().
Differential Revision: https://phabricator.services.mozilla.com/D10162
--HG--
extra : moz-landing-system : lando
For an AudioCallbackDriver, the number of input channels is immutable, and
passed at construction, so that it's less necessary to rely on global state.
MozReview-Commit-ID: F9TL1H92z3W
--HG--
extra : rebase_source : 5193488592ca97273eb2b6f43d4c7a0e4beb0a33
With the updated OnThread method SetInputListener method cannot continue asserting for being in audio callback. This check is not realistic since it is used on a newly created driver before being started.
MozReview-Commit-ID: 5gntuHm3fnr
--HG--
extra : rebase_source : e3bc17e9d8c83c4d61686889af41edfb3ef3902f
The class has been enhanced to store the thread id at the beginning of the callback and use it in order to compare with the current thread id when OnThread method is called. The old mechanism which includes the mInCallback flag has been removed.
MozReview-Commit-ID: DWSbFQfvKzX
--HG--
extra : rebase_source : e6c011da563b8f1d562ca7a394433e1e53fcffa4
Restructuring of the existing code no functional change.
MozReview-Commit-ID: JWaa8LgG4MR
--HG--
extra : rebase_source : 97190b870172549a0cd2453078c0511887059b73
Channel layout is derived by the content being played. The concept of preferred layout is meaningless. Either we have a layout defined, or we don't. There's no in-between.
So we remove it.
MozReview-Commit-ID: CSCAInNmzMS
Change AudioCallbackDriver::Init() to fallback to a system clock driver if a
cubeb context can not be obtained. This should make driver init more robust in
cases where cubeb init fails and then CubebUtils::GetCubebContext() returns no
context.
MozReview-Commit-ID: IlFPytYacoI
--HG--
extra : rebase_source : 7445ceb49583ee3ae399252e995ce6f012d9da2f
Add logging was added to help diagnose gUM failures and provide more log
coverage of that code path.
MozReview-Commit-ID: A76fjlUVpmn
--HG--
extra : rebase_source : 6f67ab223739474c8dec7a72a1ff322503c4df96
With block size 128, rounding `128` to end of next block gives `256`, which is
not what we want when running MSG iterations. That could mean over-iterating and
buffering unnecessary amounts of silence.
MozReview-Commit-ID: vW14l2ygRy
--HG--
extra : rebase_source : 8aeedc8958e646f9730c9163447e3355a73fd42e
Usually, mShouldFallbackIfError has been reset to false in DataCallback()
before Stop() is called. However, if fallback to a system clock driver due to
cubeb error had already occurred, then mShouldFallbackIfError would not have
been reset, and Stop() is still called. With mShouldFallbackIfError still
true, a cubeb error in stop would have created another fallback thread.
I expect that resetting mShouldFallbackIfError in Stop() would also be an
effective alternative solution, but resetting on StateCallback() happens
earlier, which would be an advantage if any additional errors could possibly
be reported to StateCallback().
MozReview-Commit-ID: E9j7PQmS3O4
--HG--
extra : rebase_source : 200993c9e99475101c429005cfadb7260df29067
In the MediaEngine for microphone capture we want to fall back on feeding
silence when the device is stopped. To ensure this doesn't go haywire we check
that the invariant that at most one of NotifyInputData and NotifyPull get
called in the same iteration.
For them to be aligned on which iteration they're in however, the graph needs
to report a consistent IterationEnd() to both. This patch fixes this by only
calling into NotifyInputData() *after* setting iteration state, which will then
be consistent also across OneIteration (which calls into NotifyPull).
MozReview-Commit-ID: 4lD4OcdGtM6
--HG--
extra : rebase_source : 397ee320b83b23ac21961b67341b774f18e8b51b
The changes to the cubeb API mean that the new prefs member on
cubeb_stream_params should be explicitly set. This changeset does so.
MozReview-Commit-ID: 1hwjLTriaBP
--HG--
extra : rebase_source : f32c4a0a945ed7a048ca40c7286024da1fb93473