summaryrefslogtreecommitdiff
path: root/dom/media/GraphDriver.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-08-12 14:14:18 +0000
committerMoonchild <moonchild@palemoon.org>2021-08-12 14:14:18 +0000
commit414c47071149a9ce6193dba85c77ce2360e41ff2 (patch)
tree84249949ea79a4db724097c4924e986484a9733b /dom/media/GraphDriver.cpp
parent4dd783f928ac88f285a83971f651a5a19193d110 (diff)
downloadaura-central-414c47071149a9ce6193dba85c77ce2360e41ff2.tar.gz
Issue mcp-graveyard/UXP%1806 - Update libcubeb
This is a full lib update, changing callers where needed. This also moves GertCubeMSGLatencyInFrames to CubebUtils.{cpp|h} where it belongs.
Diffstat (limited to 'dom/media/GraphDriver.cpp')
-rw-r--r--dom/media/GraphDriver.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/dom/media/GraphDriver.cpp b/dom/media/GraphDriver.cpp
index 90680d8c6..70b59c61f 100644
--- a/dom/media/GraphDriver.cpp
+++ b/dom/media/GraphDriver.cpp
@@ -593,7 +593,6 @@ AudioCallbackDriver::Init()
cubeb_stream_params output;
cubeb_stream_params input;
- uint32_t latency_frames;
MOZ_ASSERT(!NS_IsMainThread(),
"This is blocking and should never run on the main thread.");
@@ -609,14 +608,7 @@ AudioCallbackDriver::Init()
output.format = CUBEB_SAMPLE_FLOAT32NE;
}
- 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.");
- }
- }
+ uint32_t latency_frames = CubebUtils::GetCubebMSGLatencyInFrames(&output);
input = output;
input.channels = mInputChannels; // change to support optional stereo capture