began audio conform code in ffmpegdecoder
For accuracy, whenever we need to perform an audio resample, we need to do it in advance. This is in a process called "conforming" and this commit introduces the framework by which the decoder can automatically conform an audio stream to arbitrary parameters for accurate rendering.
This commit is contained in:
@@ -180,6 +180,19 @@ public:
|
||||
*/
|
||||
static DecoderPtr CreateFromID(const QString& id);
|
||||
|
||||
/**
|
||||
* @brief Conform an audio stream to match certain parameters (audio only)
|
||||
*
|
||||
* Resamples and converts the currently open audio to match the params. If the audio doesn't need conforming (e.g.
|
||||
* audio params already match or a conformed match already exists), this function will return immediately. Otherwise
|
||||
* it will block the calling thread until the conform is complete. This function should therefore only be called
|
||||
* from a background render thread.
|
||||
*
|
||||
* All audio decoders must override this. It's not pure since video decoders don't need to use this, but default
|
||||
* behavior will abort since it should never be called.
|
||||
*/
|
||||
virtual void Conform(const AudioRenderingParams& params);
|
||||
|
||||
protected:
|
||||
bool open_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user