Bug 1262753: P3. Add AudioConverter::InputConfig/OutputConfig. r?gerald draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Mon, 11 Apr 2016 21:04:15 +1000
changeset 352407 490d83b77e1f5e7fc0da89835b315ac921ae4f29
parent 352406 fc8be7f3988a9b221437efc0d767dc30a90dc385
child 352408 59b7feafe4c24789952a434c2b54336a8b0f97e4
push id15703
push userbmo:jyavenard@mozilla.com
push dateMon, 18 Apr 2016 07:44:49 +0000
reviewersgerald
bugs1262753
milestone48.0a1
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