mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 02:05:42 +00:00
Bug 1531833 - Expose a way to set a global "communication mode" in CubebUtils, to be use by real-time duplex audio users. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D21736 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
9936332833
commit
b64c360235
@ -309,6 +309,12 @@ void ForceSetCubebContext(cubeb* aCubebContext) {
|
||||
sCubebState = CubebState::Initialized;
|
||||
}
|
||||
|
||||
void SetInCommunication(bool aInCommunication) {
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
java::GeckoAppShell::SetCommunicationAudioModeOn(aInCommunication);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool InitPreferredSampleRate() {
|
||||
StaticMutexAutoLock lock(sMutex);
|
||||
if (sPreferredSampleRate != 0) {
|
||||
|
@ -45,6 +45,10 @@ bool CubebLatencyPrefSet();
|
||||
void GetCurrentBackend(nsAString& aBackend);
|
||||
cubeb_stream_prefs GetDefaultStreamPrefs();
|
||||
char* GetForcedOutputDevice();
|
||||
// No-op on all platforms but Android, where it tells the device's AudioManager
|
||||
// to switch to "communication mode", which might change audio routing,
|
||||
// bluetooth communication type, etc.
|
||||
void SetInCommunication(bool aInCommunication);
|
||||
|
||||
# ifdef MOZ_WIDGET_ANDROID
|
||||
uint32_t AndroidGetAudioOutputSampleRate();
|
||||
|
Loading…
Reference in New Issue
Block a user