Finish CurveEditor implementation

This commit is contained in:
Jack Andersen
2018-08-04 12:05:01 -10:00
parent c2a242022a
commit 2abed18784
8 changed files with 449 additions and 40 deletions

View File

@@ -715,9 +715,9 @@ bool SoundMacro::CmdScaleVolume::Do(SoundMacroState& st, Voice& vox) const
if (table.id != 0)
{
const Curve* curveData = vox.getAudioGroup().getPool().tableAsCurves(table.id);
if (curveData)
if (curveData && curveData->data.size() >= 128)
{
vox.m_curVol = curveData->data.at(eval) / 127.f;
vox.m_curVol = curveData->data[eval] / 127.f;
return false;
}
}