Mercurial > hg > svapp
comparison audioio/AudioCallbackPlaySource.cpp @ 9:e71385792d9d
* Add ffwd/rewind
* Abstract out MultiSelection
author | Chris Cannam |
---|---|
date | Wed, 08 Feb 2006 17:59:16 +0000 |
parents | 24b500216029 |
children | b6dc944128da |
comparison
equal
deleted
inserted
replaced
8:24b500216029 | 9:e71385792d9d |
---|---|
231 void | 231 void |
232 AudioCallbackPlaySource::play(size_t startFrame) | 232 AudioCallbackPlaySource::play(size_t startFrame) |
233 { | 233 { |
234 if (m_viewManager->getPlaySelectionMode() && | 234 if (m_viewManager->getPlaySelectionMode() && |
235 !m_viewManager->getSelections().empty()) { | 235 !m_viewManager->getSelections().empty()) { |
236 ViewManager::SelectionList selections = m_viewManager->getSelections(); | 236 MultiSelection::SelectionList selections = m_viewManager->getSelections(); |
237 ViewManager::SelectionList::iterator i = selections.begin(); | 237 MultiSelection::SelectionList::iterator i = selections.begin(); |
238 if (i != selections.end()) { | 238 if (i != selections.end()) { |
239 if (startFrame < i->getStartFrame()) { | 239 if (startFrame < i->getStartFrame()) { |
240 startFrame = i->getStartFrame(); | 240 startFrame = i->getStartFrame(); |
241 } else { | 241 } else { |
242 ViewManager::SelectionList::iterator j = selections.end(); | 242 MultiSelection::SelectionList::iterator j = selections.end(); |
243 --j; | 243 --j; |
244 if (startFrame >= j->getEndFrame()) { | 244 if (startFrame >= j->getEndFrame()) { |
245 startFrame = i->getStartFrame(); | 245 startFrame = i->getStartFrame(); |
246 } | 246 } |
247 } | 247 } |
390 stop(); | 390 stop(); |
391 } | 391 } |
392 return framePlaying; | 392 return framePlaying; |
393 } | 393 } |
394 | 394 |
395 ViewManager::SelectionList selections = m_viewManager->getSelections(); | 395 MultiSelection::SelectionList selections = m_viewManager->getSelections(); |
396 ViewManager::SelectionList::const_iterator i; | 396 MultiSelection::SelectionList::const_iterator i; |
397 | 397 |
398 i = selections.begin(); | 398 i = selections.begin(); |
399 size_t rangeStart = i->getStartFrame(); | 399 size_t rangeStart = i->getStartFrame(); |
400 | 400 |
401 i = selections.end(); | 401 i = selections.end(); |