diff options
author | Moonchild <moonchild@palemoon.org> | 2019-11-03 11:20:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-03 11:20:08 +0100 |
commit | b7c6c779ee1d0100842822a1a9c63cd97d27644b (patch) | |
tree | cd6504982a432efda7dcd0b5208efde4c04847b1 /dom | |
parent | 21b3f6247403c06f85e1f45d219f87549862198f (diff) | |
parent | 22b35fa8e923d52a3fa785993c28c3e63cd1ee1e (diff) | |
download | UXP-b7c6c779ee1d0100842822a1a9c63cd97d27644b.tar UXP-b7c6c779ee1d0100842822a1a9c63cd97d27644b.tar.gz UXP-b7c6c779ee1d0100842822a1a9c63cd97d27644b.tar.lz UXP-b7c6c779ee1d0100842822a1a9c63cd97d27644b.tar.xz UXP-b7c6c779ee1d0100842822a1a9c63cd97d27644b.zip |
Merge pull request #1270 from g4jc/libcubeb
Update libcubeb
Diffstat (limited to 'dom')
-rw-r--r-- | dom/media/CubebUtils.cpp | 4 | ||||
-rw-r--r-- | dom/media/GraphDriver.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/dom/media/CubebUtils.cpp b/dom/media/CubebUtils.cpp index 0f0167d9c..8f1ea0179 100644 --- a/dom/media/CubebUtils.cpp +++ b/dom/media/CubebUtils.cpp @@ -55,6 +55,7 @@ bool sCubebPlaybackLatencyPrefSet; bool sCubebMSGLatencyPrefSet; bool sAudioStreamInitEverSucceeded = false; StaticAutoPtr<char> sBrandName; +StaticAutoPtr<char> sCubebBackendName; const char kBrandBundleURL[] = "chrome://branding/locale/brand.properties"; @@ -226,7 +227,7 @@ cubeb* GetCubebContextUnlocked() sBrandName, "Did not initialize sbrandName, and not on the main thread?"); } - int rv = cubeb_init(&sCubebContext, sBrandName); + int rv = cubeb_init(&sCubebContext, sBrandName, sCubebBackendName); NS_WARNING_ASSERTION(rv == CUBEB_OK, "Could not get a cubeb context."); sCubebState = (rv == CUBEB_OK) ? CubebState::Initialized : CubebState::Uninitialized; @@ -292,6 +293,7 @@ void ShutdownLibrary() sCubebContext = nullptr; } sBrandName = nullptr; + sCubebBackendName = nullptr; // This will ensure we don't try to re-create a context. sCubebState = CubebState::Shutdown; } diff --git a/dom/media/GraphDriver.cpp b/dom/media/GraphDriver.cpp index 37c692a4b..aa75918f1 100644 --- a/dom/media/GraphDriver.cpp +++ b/dom/media/GraphDriver.cpp @@ -656,7 +656,7 @@ AudioCallbackDriver::Init() if (latencyPref) { latency_frames = latencyPref.value(); } else { - if (cubeb_get_min_latency(cubebContext, output, &latency_frames) != CUBEB_OK) { + if (cubeb_get_min_latency(cubebContext, &output, &latency_frames) != CUBEB_OK) { NS_WARNING("Could not get minimal latency from cubeb."); } } |