author | Paul Adenot <paul@paul.cx> |
Mon, 23 Jan 2017 11:36:58 +0100 | |
changeset 330631 | 36486fdc3813ef7943ae5b07b4128866d1938a6c |
parent 330630 | 38db7f01d45d75547b026fbc9d739fe90e93675c |
child 330632 | f80dc9fc34680105b714a49b4704bb843f5f7004 |
child 330642 | 0b284d45431ef73097cb313ec9b1390bb5cbba24 |
child 330687 | f0a51d9d7c23a22e43a19e6826f84cf16926bb36 |
child 342156 | 69800debbe54f118693ad697b823ad7266232957 |
push id | 31246 |
push user | paul@paul.cx |
push date | Mon, 23 Jan 2017 10:37:30 +0000 |
treeherder | mozilla-central@36486fdc3813 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | achronop, tomcat |
bugs | 1332905 |
milestone | 53.0a1 |
first release with | nightly linux32
36486fdc3813
/
53.0a1
/
20170123125947
/
files
nightly linux64
36486fdc3813
/
53.0a1
/
20170123125947
/
files
nightly mac
36486fdc3813
/
53.0a1
/
20170123030211
/
files
nightly win32
36486fdc3813
/
53.0a1
/
20170123030211
/
files
nightly win64
36486fdc3813
/
53.0a1
/
20170123030211
/
files
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
releases | nightly linux32
53.0a1
/
20170123125947
/
pushlog to previous
nightly linux64
53.0a1
/
20170123125947
/
pushlog to previous
nightly mac
53.0a1
/
20170123030211
/
pushlog to previous
nightly win32
53.0a1
/
20170123030211
/
pushlog to previous
nightly win64
53.0a1
/
20170123030211
/
pushlog to previous
|
dom/media/AudioStream.cpp | file | annotate | diff | comparison | revisions | |
dom/media/GraphDriver.cpp | file | annotate | diff | comparison | revisions |
--- a/dom/media/AudioStream.cpp +++ b/dom/media/AudioStream.cpp @@ -349,20 +349,19 @@ AudioStream::Init(uint32_t aNumChannels, cubeb* cubebContext = CubebUtils::GetCubebContext(); if (!cubebContext) { NS_WARNING("Can't get cubeb context!"); CubebUtils::ReportCubebStreamInitFailure(true); return NS_ERROR_DOM_MEDIA_CUBEB_INITIALIZATION_ERR; } - cubeb_channel_layout layout; - int r = cubeb_get_preferred_channel_layout(cubebContext, &layout); - MOZ_ASSERT(r == CUBEB_OK || r == CUBEB_ERROR_NOT_SUPPORTED); - params.layout = (r == CUBEB_OK) ? layout : CUBEB_LAYOUT_UNDEFINED; + // The DecodedAudioDataSink forces mono or stereo for now. + params.layout = params.channels == 1 ? CUBEB_LAYOUT_MONO + : CUBEB_LAYOUT_STEREO; return OpenCubeb(cubebContext, params, startTime, CubebUtils::GetFirstStream()); } nsresult AudioStream::OpenCubeb(cubeb* aContext, cubeb_stream_params& aParams, TimeStamp aStartTime, bool aIsFirst) {
--- a/dom/media/GraphDriver.cpp +++ b/dom/media/GraphDriver.cpp @@ -634,20 +634,18 @@ AudioCallbackDriver::Init() output.channels = mGraphImpl->AudioChannelCount(); if (AUDIO_OUTPUT_FORMAT == AUDIO_FORMAT_S16) { output.format = CUBEB_SAMPLE_S16NE; } else { output.format = CUBEB_SAMPLE_FLOAT32NE; } - cubeb_channel_layout layout; - int r = cubeb_get_preferred_channel_layout(cubebContext, &layout); - MOZ_ASSERT(r == CUBEB_OK || r == CUBEB_ERROR_NOT_SUPPORTED); - output.layout = (r == CUBEB_OK) ? layout : CUBEB_LAYOUT_UNDEFINED; + // Graphs are always stereo for now. + output.layout = CUBEB_LAYOUT_STEREO; 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."); return false;