Bug 1444479 - P4. Add new AudioConfig constructor. r=padenot
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 16 Mar 2018 16:49:09 +0100
changeset 463338 5e3da7510ef199b444e66148724357a8d86aade9
parent 463337 b821de55844fc0d8bf5def89110bfa55268ed166
child 463339 3207ab7618d5be61f1f5634271724457a29878a9
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1444479
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1444479 - P4. Add new AudioConfig constructor. r=padenot This will allow to create an AudioConfig with an unknown or unsupported channel layout, defaulting instead to the number of channels. MozReview-Commit-ID: IonLuo9q2a5
dom/media/AudioConfig.cpp
--- a/dom/media/AudioConfig.cpp
+++ b/dom/media/AudioConfig.cpp
@@ -322,16 +322,29 @@ AudioConfig::AudioConfig(const ChannelLa
   : mChannelLayout(aChannelLayout)
   , mChannels(aChannelLayout.Count())
   , mRate(aRate)
   , mFormat(aFormat)
   , mInterleaved(aInterleaved)
 {
 }
 
+AudioConfig::AudioConfig(const ChannelLayout& aChannelLayout,
+                         uint32_t aChannels,
+                         uint32_t aRate,
+                         AudioConfig::SampleFormat aFormat,
+                         bool aInterleaved)
+  : mChannelLayout(aChannelLayout)
+  , mChannels(aChannels)
+  , mRate(aRate)
+  , mFormat(aFormat)
+  , mInterleaved(aInterleaved)
+{
+}
+
 AudioConfig::AudioConfig(uint32_t aChannels,
                          uint32_t aRate,
                          AudioConfig::SampleFormat aFormat,
                          bool aInterleaved)
   : mChannelLayout(aChannels)
   , mChannels(aChannels)
   , mRate(aRate)
   , mFormat(aFormat)