looperclip: use [] to access vector not .at()

Optimize away a bunch of bad performance

Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>
main
Harry van Haaren 2018-02-13 23:06:14 +00:00
parent 01a6fded5f
commit 5692d5123d
1 changed files with 3 additions and 3 deletions

View File

@ -430,9 +430,9 @@ void LooperClip::getSample(float playSpeed, float* L, float* R)
std::vector<float>& vL = _buffer->getDataL();
std::vector<float>& vR = _buffer->getDataR();
*L = vL.at(_playhead);
*R = vR.at(_playhead);
_playhead +=playSpeed;
*L = vL[_playhead];
*R = vR[_playhead];
_playhead += playSpeed;
} else {
*L = 0.f;
*R = 0.f;