void AudioTrack::eraseACEvent(int id, int frame) { ciCtrlList icl = _controller.find(id); if (icl == _controller.end()) return; CtrlList* cl = icl->second; if (cl->empty()) return; iCtrl s = cl->find(frame); if (s != cl->end()) cl->erase(s); return; }
void AudioTrack::eraseRangeACEvents(int id, int frame1, int frame2) { ciCtrlList icl = _controller.find(id); if (icl == _controller.end()) return; CtrlList* cl = icl->second; if (cl->empty()) return; iCtrl s = cl->lower_bound(frame1); iCtrl e = cl->lower_bound(frame2); cl->erase(s, e); return; }
void AudioTrack::seekPrevACEvent(int id) { ciCtrlList icl = _controller.find(id); if (icl == _controller.end()) return; CtrlList* cl = icl->second; if (cl->empty()) return; iCtrl s = cl->lower_bound(song->cPos().frame()); if (s != cl->begin()) --s; song->setPos(Song::CPOS, Pos(s->second.getFrame(), false), true, false, true); return; }