Mercurial > hg > svgui
comparison view/ViewManager.cpp @ 1186:8665e0ffa0d8 levelpanwidget
Merge from branch 3.0-integration
author | Chris Cannam |
---|---|
date | Wed, 14 Dec 2016 14:28:41 +0000 |
parents | f32828ea63d9 |
children | efc7586de499 |
comparison
equal
deleted
inserted
replaced
1180:6a6a63506e3f | 1186:8665e0ffa0d8 |
---|---|
157 sv_frame_t | 157 sv_frame_t |
158 ViewManager::getPlaybackFrame() const | 158 ViewManager::getPlaybackFrame() const |
159 { | 159 { |
160 if (m_playSource && m_playSource->isPlaying()) { | 160 if (m_playSource && m_playSource->isPlaying()) { |
161 m_playbackFrame = m_playSource->getCurrentPlayingFrame(); | 161 m_playbackFrame = m_playSource->getCurrentPlayingFrame(); |
162 #ifdef DEBUG_VIEW_MANAGER | |
163 cout << "ViewManager::getPlaybackFrame(playing) -> " << m_playbackFrame << endl; | |
164 #endif | |
165 } else { | |
166 #ifdef DEBUG_VIEW_MANAGER | |
167 cout << "ViewManager::getPlaybackFrame(not playing) -> " << m_playbackFrame << endl; | |
168 #endif | |
162 } | 169 } |
163 return m_playbackFrame; | 170 return m_playbackFrame; |
164 } | 171 } |
165 | 172 |
166 void | 173 void |
167 ViewManager::setPlaybackFrame(sv_frame_t f) | 174 ViewManager::setPlaybackFrame(sv_frame_t f) |
168 { | 175 { |
176 #ifdef DEBUG_VIEW_MANAGER | |
177 cerr << "ViewManager::setPlaybackFrame(" << f << ")" << endl; | |
178 #endif | |
169 if (f < 0) f = 0; | 179 if (f < 0) f = 0; |
170 if (m_playbackFrame != f) { | 180 if (m_playbackFrame != f) { |
171 m_playbackFrame = f; | 181 m_playbackFrame = f; |
172 emit playbackFrameChanged(f); | 182 emit playbackFrameChanged(f); |
173 if (m_playSource && m_playSource->isPlaying()) { | 183 if (m_playSource && m_playSource->isPlaying()) { |
487 } | 497 } |
488 return 0; | 498 return 0; |
489 } | 499 } |
490 | 500 |
491 sv_samplerate_t | 501 sv_samplerate_t |
492 ViewManager::getOutputSampleRate() const | 502 ViewManager::getDeviceSampleRate() const |
493 { | 503 { |
494 if (m_playSource) { | 504 if (m_playSource) { |
495 return m_playSource->getTargetSampleRate(); | 505 return m_playSource->getDeviceSampleRate(); |
496 } | 506 } |
497 return 0; | 507 return 0; |
498 } | 508 } |
499 | 509 |
500 void | 510 void |