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

Optimize away a bunch of bad performance

Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>
This commit is contained in:
Harry van Haaren 2018-02-13 23:06:14 +00:00
parent 01a6fded5f
commit 5692d5123d

View file

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