Use a range-based for loop to avoid manual iterator handling
This commit is contained in:
@@ -162,9 +162,8 @@ int RageSoundReader_Split::Read( float *pBuf, int iFrames )
|
|||||||
|
|
||||||
{
|
{
|
||||||
RageSoundMixBuffer mix;
|
RageSoundMixBuffer mix;
|
||||||
for( int i = 0; i < (int) m_aChannels.size(); ++i )
|
for( const ChannelMap& chan : m_aChannels )
|
||||||
{
|
{
|
||||||
const ChannelMap &chan = m_aChannels[i];
|
|
||||||
mix.SetWriteOffset( chan.m_iToChannel );
|
mix.SetWriteOffset( chan.m_iToChannel );
|
||||||
mix.write( pSrc + chan.m_iFromChannel, iFramesAvailable, m_pImpl->m_pSource->GetNumChannels(), m_iNumOutputChannels );
|
mix.write( pSrc + chan.m_iFromChannel, iFramesAvailable, m_pImpl->m_pSource->GetNumChannels(), m_iNumOutputChannels );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user