lookahead for all patterns in play-list to see which ones exceed in the next nSamples */
| 1115 | /* lookahead for all patterns in play-list to see which ones exceed in the next nSamples |
| 1116 | */ |
| 1117 | void CMusicSystem::AdjustMixStreamsRefCount(int nSamples) |
| 1118 | { |
| 1119 | for (TPatternPlayInfoVecIt It=m_vecPlayingPatterns.begin();It!=m_vecPlayingPatterns.end();++It) |
| 1120 | { |
| 1121 | SMusicPatternPlayInfo &PlayInfo=(*It); |
| 1122 | if (!PlayInfo.pRefCount) |
| 1123 | continue; |
| 1124 | int nSamplesToEnd=PlayInfo.pPatternInstance->GetSamplesToEnd(); |
| 1125 | if (nSamplesToEnd<=nSamples) |
| 1126 | { |
| 1127 | (*(PlayInfo.pRefCount))--; |
| 1128 | PlayInfo.bRefCountAdjusted=true; |
| 1129 | } |
| 1130 | } |
| 1131 | } |
| 1132 | |
| 1133 | /* mix all streams in the play-list into pBuffer; mixlength is nSamples |
| 1134 | the data is processed before mixing if needed (eg. ramping) |
nothing calls this directly
no test coverage detected