summaryrefslogtreecommitdiffstats
path: root/dom/media/CubebUtils.cpp
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-11-02 11:59:57 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-11-02 23:02:54 -0400
commit22b35fa8e923d52a3fa785993c28c3e63cd1ee1e (patch)
treecd6504982a432efda7dcd0b5208efde4c04847b1 /dom/media/CubebUtils.cpp
parentd162ecbaffe845c9707da5d2f6cab11f343ef00e (diff)
downloadUXP-22b35fa8e923d52a3fa785993c28c3e63cd1ee1e.tar
UXP-22b35fa8e923d52a3fa785993c28c3e63cd1ee1e.tar.gz
UXP-22b35fa8e923d52a3fa785993c28c3e63cd1ee1e.tar.lz
UXP-22b35fa8e923d52a3fa785993c28c3e63cd1ee1e.tar.xz
UXP-22b35fa8e923d52a3fa785993c28c3e63cd1ee1e.zip
Issue #1267 - Part 2: fix libcubeb bindings in dom
Diffstat (limited to 'dom/media/CubebUtils.cpp')
-rw-r--r--dom/media/CubebUtils.cpp4
1 files changed, 3 insertions, 1 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;
}