Bug 1262753: P3. Add AudioConverter::InputConfig/OutputConfig. r=gerald
authorJean-Yves Avenard <jyavenard@mozilla.com>
Mon, 11 Apr 2016 21:04:15 +1000
changeset 331432 1ccaf7f6a120f138e8e46d022413609602efde94
parent 331431 0434086421da8495b8791b27577f136b1f61456e
child 331433 35cf8fc31a77376b4893e3886970c6a6557ab931
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1262753
milestone48.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 1262753: P3. Add AudioConverter::InputConfig/OutputConfig. r=gerald Allow access to original constructor objects, to avoid having to store the original AudioConfig objects elsewhere. MozReview-Commit-ID: 66pbRJ0wyl
dom/media/AudioConverter.h
--- a/dom/media/AudioConverter.h
+++ b/dom/media/AudioConverter.h
@@ -133,16 +133,19 @@ public:
     return Process(aBuffer, aBuffer, aSamples * AudioConfig::SampleSize(mIn.Format()));
   }
   bool CanWorkInPlace() const;
   bool CanReorderAudio() const
   {
     return mIn.Layout().MappingTable(mOut.Layout());
   }
 
+  const AudioConfig& InputConfig() const { return mIn; }
+  const AudioConfig& OutputConfig() const { return mOut; }
+
 private:
   const AudioConfig mIn;
   const AudioConfig mOut;
   uint8_t mChannelOrderMap[MAX_AUDIO_CHANNELS];
   /**
    * Process
    * Parameters:
    * aOut  : destination buffer where converted samples will be copied