comparison view/ViewManager.cpp @ 1465:f31ccc5f3fb8

Don't attempt performance alignment when not in align mode
author Chris Cannam
date Fri, 24 May 2019 15:13:57 +0100
parents c8a6fd3f9dff
children de41a11cabc2
comparison
equal deleted inserted replaced
1462:6bd413aff85c 1465:f31ccc5f3fb8
209 ViewManager::alignPlaybackFrameToReference(sv_frame_t frame) const 209 ViewManager::alignPlaybackFrameToReference(sv_frame_t frame) const
210 { 210 {
211 #ifdef DEBUG_VIEW_MANAGER 211 #ifdef DEBUG_VIEW_MANAGER
212 cerr << "ViewManager::alignPlaybackFrameToReference(" << frame << "): playback model is " << m_playbackModel << endl; 212 cerr << "ViewManager::alignPlaybackFrameToReference(" << frame << "): playback model is " << m_playbackModel << endl;
213 #endif 213 #endif
214 if (!m_playbackModel) { 214 if (!m_playbackModel || !m_alignMode) {
215 return frame; 215 return frame;
216 } else { 216 } else {
217 sv_frame_t f = m_playbackModel->alignToReference(frame); 217 sv_frame_t f = m_playbackModel->alignToReference(frame);
218 #ifdef DEBUG_VIEW_MANAGER 218 #ifdef DEBUG_VIEW_MANAGER
219 cerr << "aligned frame = " << f << endl; 219 cerr << "aligned frame = " << f << endl;
226 ViewManager::alignReferenceToPlaybackFrame(sv_frame_t frame) const 226 ViewManager::alignReferenceToPlaybackFrame(sv_frame_t frame) const
227 { 227 {
228 #ifdef DEBUG_VIEW_MANAGER 228 #ifdef DEBUG_VIEW_MANAGER
229 cerr << "ViewManager::alignReferenceToPlaybackFrame(" << frame << "): playback model is " << m_playbackModel << endl; 229 cerr << "ViewManager::alignReferenceToPlaybackFrame(" << frame << "): playback model is " << m_playbackModel << endl;
230 #endif 230 #endif
231 if (!m_playbackModel) { 231 if (!m_playbackModel || !m_alignMode) {
232 return frame; 232 return frame;
233 } else { 233 } else {
234 sv_frame_t f = m_playbackModel->alignFromReference(frame); 234 sv_frame_t f = m_playbackModel->alignFromReference(frame);
235 #ifdef DEBUG_VIEW_MANAGER 235 #ifdef DEBUG_VIEW_MANAGER
236 cerr << "aligned frame = " << f << endl; 236 cerr << "aligned frame = " << f << endl;