comparison widgets/Pane.cpp @ 15:4d5d9aba406b

* Fix update and play limits for play-selection mode when not looping * Fix playback in loop mode when no selection -- but the GUI update for this is still wrong on the flyback * Various fixes and improvements to making selections, particularly during playback * Draw selection under non-opaque non-scrollable layers, so as to improve cacheing * Show selection limits as text when drawing selection * Allow user to find missing audio files when loading session * Cross-fade selections when in play-selection mode -- mostly. We don't cross-fade on a processing block boundary, and unfortunately with short selections the selection boundary is quite likely to coincide with a block boundary.
author Chris Cannam
date Wed, 25 Jan 2006 17:46:28 +0000
parents aa37f84ab70a
children 0183ebb725ca
comparison
equal deleted inserted replaced
14:aa37f84ab70a 15:4d5d9aba406b
438 438
439 if (m_manager) { 439 if (m_manager) {
440 m_manager->setInProgressSelection(Selection(min, max), 440 m_manager->setInProgressSelection(Selection(min, max),
441 !m_ctrlPressed); 441 !m_ctrlPressed);
442 } 442 }
443 443
444 if (!m_manager || !m_manager->isPlaying()) { 444 bool doScroll = false;
445 if (!m_manager) doScroll = true;
446 if (!m_manager->isPlaying()) doScroll = true;
447 if (m_followPlay != PlaybackScrollContinuous) doScroll = true;
448
449 if (doScroll) {
445 int offset = mouseFrame - getStartFrame(); 450 int offset = mouseFrame - getStartFrame();
446 int available = getEndFrame() - getStartFrame(); 451 int available = getEndFrame() - getStartFrame();
447 if (offset >= available * 0.9) { 452 if (offset >= available * 0.95) {
448 int move = int(offset - available * 0.9) + 1; 453 int move = int(offset - available * 0.95) + 1;
449 setCentreFrame(m_centreFrame + move); 454 setCentreFrame(m_centreFrame + move);
450 } else if (offset <= available * 0.15) { 455 } else if (offset <= available * 0.10) {
451 int move = int(available * 0.15 - offset) + 1; 456 int move = int(available * 0.10 - offset) + 1;
452 if (m_centreFrame > move) { 457 if (m_centreFrame > move) {
453 setCentreFrame(m_centreFrame - move); 458 setCentreFrame(m_centreFrame - move);
454 } else { 459 } else {
455 setCentreFrame(0); 460 setCentreFrame(0);
456 } 461 }