| 1137 | } |
| 1138 | |
| 1139 | bool EffectEqualization48x::ProcessOne8x(int count, WaveTrack * t, |
| 1140 | sampleCount start, sampleCount len) |
| 1141 | { |
| 1142 | sampleCount blockCount=len/mBlockSize; |
| 1143 | |
| 1144 | if(blockCount<32) // it's not worth 8x processing do a regular process |
| 1145 | return ProcessOne4x(count, t, start, len); |
| 1146 | |
| 1147 | auto trackBlockSize = t->GetMaxBlockSize(); |
| 1148 | |
| 1149 | auto output = t->EmptyCopy(); |
| 1150 | t->ConvertToSampleFormat( floatSample ); |
| 1151 | |
| 1152 | mEffectEqualization->TrackProgress(count, 0.0); |
| 1153 | int bigRuns=len/(mSubBufferSize-mBlockSize); |
| 1154 | int trackBlocksPerBig=mSubBufferSize/trackBlockSize; |
| 1155 | int trackLeftovers=mSubBufferSize-trackBlocksPerBig*trackBlockSize; |
| 1156 | int singleProcessLength=(mFilterSize>>1)*bigRuns + len%(bigRuns*(mSubBufferSize-mBlockSize)); |
| 1157 | auto currentSample=start; |
| 1158 | |
| 1159 | bool bBreakLoop = false; |
| 1160 | for(int bigRun=0;bigRun<bigRuns;bigRun++) |
| 1161 | { |
| 1162 | // fill the buffer |
| 1163 | for(int i=0;i<trackBlocksPerBig;i++) { |
| 1164 | t->Get((samplePtr)&mBigBuffer[i*trackBlockSize], floatSample, currentSample, trackBlockSize); |
| 1165 | currentSample+=trackBlockSize; |
| 1166 | } |
| 1167 | if(trackLeftovers) { |
| 1168 | t->Get((samplePtr)&mBigBuffer[trackBlocksPerBig*trackBlockSize], floatSample, currentSample, trackLeftovers); |
| 1169 | currentSample+=trackLeftovers; |
| 1170 | } |
| 1171 | currentSample-=mBlockSize+(mFilterSize>>1); |
| 1172 | |
| 1173 | ProcessBuffer4x(mBufferInfo); |
| 1174 | if (bBreakLoop=mEffectEqualization->TrackProgress(count, (double)(bigRun)/(double)bigRuns)) |
| 1175 | { |
| 1176 | break; |
| 1177 | } |
| 1178 | output->Append((samplePtr)&mBigBuffer[(bigRun?mBlockSize:0)+(mFilterSize>>1)], floatSample, mSubBufferSize-((bigRun?mBlockSize:0)+(mFilterSize>>1))); |
| 1179 | } |
| 1180 | if(singleProcessLength && !bBreakLoop) { |
| 1181 | t->Get((samplePtr)mBigBuffer.get(), floatSample, currentSample, singleProcessLength+mBlockSize+(mFilterSize>>1)); |
| 1182 | ProcessBuffer(mBigBuffer.get(), mBigBuffer.get(), singleProcessLength+mBlockSize+(mFilterSize>>1)); |
| 1183 | output->Append((samplePtr)&mBigBuffer[mBlockSize], floatSample, singleProcessLength+mBlockSize+(mFilterSize>>1)); |
| 1184 | } |
| 1185 | output->Flush(); |
| 1186 | if(!bBreakLoop) |
| 1187 | ProcessTail(t, output.get(), start, len); |
| 1188 | return bBreakLoop; |
| 1189 | } |
| 1190 | |
| 1191 | bool EffectEqualization48x::ProcessOne8xThreaded(int count, WaveTrack * t, |
| 1192 | sampleCount start, sampleCount len) |
nothing calls this directly
no test coverage detected