Add deinterlacing function to RageSoundMixBuffer
JACK processes every channel separately, so we need this. The audio data is interlaced all the way back at RageSound::GetDataToPlay(), so this is an easier hack for now than using deinterlaced until it's needed.
This commit is contained in:
@@ -90,6 +90,14 @@ void RageSoundMixBuffer::read( float *pBuf )
|
||||
m_iBufUsed = 0;
|
||||
}
|
||||
|
||||
void RageSoundMixBuffer::read_deinterlace( float **pBufs, int channels )
|
||||
{
|
||||
for( int i = 0; i < m_iBufUsed; ++i )
|
||||
for( int ch = 0; ch < channels; ++ch )
|
||||
pBufs[ch][i] = m_pMixbuf[channels * i + ch];
|
||||
m_iBufUsed = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
|
||||
@@ -17,6 +17,7 @@ public:
|
||||
|
||||
void read( int16_t *pBuf );
|
||||
void read( float *pBuf );
|
||||
void read_deinterlace( float **pBufs, int channels );
|
||||
float *read() { return m_pMixbuf; }
|
||||
unsigned size() const { return m_iBufUsed; }
|
||||
void SetWriteOffset( int iOffset );
|
||||
|
||||
Reference in New Issue
Block a user