diff --git a/src/arch/Sound/RageSoundDriver.h b/src/arch/Sound/RageSoundDriver.h index a377e10f0d..c2b230926b 100644 --- a/src/arch/Sound/RageSoundDriver.h +++ b/src/arch/Sound/RageSoundDriver.h @@ -94,6 +94,8 @@ protected: void Mix( int16_t *pBuf, int iFrames, int64_t iFrameNumber, int64_t iCurrentFrame ); void Mix( float *pBuf, int iFrames, int64_t iFrameNumber, int64_t iCurrentFrame ); + void MixDeinterlaced( float **pBufs, int channels, int iFrames, int64_t iFrameNumber, int64_t iCurrentFrame ); + private: /* This mutex is used for serializing with the decoder thread. Locking this mutex * can take a while. */ diff --git a/src/arch/Sound/RageSoundDriver_Generic_Software.cpp b/src/arch/Sound/RageSoundDriver_Generic_Software.cpp index 3b9db11cb6..a35a71d74d 100644 --- a/src/arch/Sound/RageSoundDriver_Generic_Software.cpp +++ b/src/arch/Sound/RageSoundDriver_Generic_Software.cpp @@ -170,6 +170,13 @@ void RageSoundDriver::Mix( float *pBuf, int iFrames, int64_t iFrameNumber, int64 MixIntoBuffer( iFrames, iFrameNumber, iCurrentFrame ).read( pBuf ); } +void RageSoundDriver::MixDeinterlaced( float **pBufs, int channels, int iFrames, int64_t iFrameNumber, int64_t iCurrentFrame ) +{ + for (int i = 0; i < channels; ++i ) + memset( pBufs[i], 0, iFrames*sizeof(float) ); + MixIntoBuffer( iFrames, iFrameNumber, iCurrentFrame ).read_deinterlace( pBufs, channels ); +} + void RageSoundDriver::DecodeThread() { SetupDecodingThread();