-void
-Editor::playhead_backward ()
-{
- framepos_t pos;
- framepos_t cnt;
- float prefix;
- bool was_floating;
-
- if (get_prefix (prefix, was_floating)) {
- cnt = 1;
- } else {
- if (was_floating) {
- cnt = (framepos_t) floor (prefix * _session->frame_rate ());
- } else {
- cnt = (framepos_t) prefix;
- }
- }
-
- pos = playhead_cursor->current_frame;
-
- if ((framepos_t) pos < cnt) {
- pos = 0;
- } else {
- pos -= cnt;
- }
-
- /* XXX this is completely insane. with the current buffering
- design, we'll force a complete track buffer flush and
- reload, just to move 1 sample !!!
- */
-
- _session->request_locate (pos);
-}
-
-void
-Editor::playhead_forward ()
-{
- framepos_t pos;
- framepos_t cnt;
- bool was_floating;
- float prefix;
-
- if (get_prefix (prefix, was_floating)) {
- cnt = 1;
- } else {
- if (was_floating) {
- cnt = (framepos_t) floor (prefix * _session->frame_rate ());
- } else {
- cnt = (framepos_t) floor (prefix);
- }
- }
-
- pos = playhead_cursor->current_frame;
-
- /* XXX this is completely insane. with the current buffering
- design, we'll force a complete track buffer flush and
- reload, just to move 1 sample !!!
- */
-
- _session->request_locate (pos+cnt);
-}
-