Add MixDeinterlaced to RageSoundDriver

This complements the read_deinterlace function just added.
This commit is contained in:
Devin J. Pohly
2013-08-08 13:30:39 -04:00
parent deab7e6f47
commit 982d9e2dbc
2 changed files with 9 additions and 0 deletions
+2
View File
@@ -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. */
@@ -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();