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
--- 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