Mercurial > hg > svapp
comparison audio/AudioCallbackPlaySource.cpp @ 509:7cf6f5501212 tony-2.0-integration
Trim suspend/resume calls
author | Chris Cannam |
---|---|
date | Wed, 14 Oct 2015 16:02:09 +0100 |
parents | 39e94df71d24 |
children | 83c60632bac0 |
comparison
equal
deleted
inserted
replaced
508:b84d9b512dbd | 509:7cf6f5501212 |
---|---|
412 } | 412 } |
413 | 413 |
414 void | 414 void |
415 AudioCallbackPlaySource::play(sv_frame_t startFrame) | 415 AudioCallbackPlaySource::play(sv_frame_t startFrame) |
416 { | 416 { |
417 if (m_target) m_target->resume(); | |
418 | |
419 if (!m_sourceSampleRate) { | 417 if (!m_sourceSampleRate) { |
420 cerr << "AudioCallbackPlaySource::play: No source sample rate available, not playing" << endl; | 418 cerr << "AudioCallbackPlaySource::play: No source sample rate available, not playing" << endl; |
421 return; | 419 return; |
422 } | 420 } |
423 | 421 |
524 emit activity(tr("Stop at %1").arg | 522 emit activity(tr("Stop at %1").arg |
525 (RealTime::frame2RealTime | 523 (RealTime::frame2RealTime |
526 (m_lastCurrentFrame, m_sourceSampleRate).toText().c_str())); | 524 (m_lastCurrentFrame, m_sourceSampleRate).toText().c_str())); |
527 } | 525 } |
528 m_lastCurrentFrame = 0; | 526 m_lastCurrentFrame = 0; |
529 | |
530 if (m_target) m_target->suspend(); | |
531 } | 527 } |
532 | 528 |
533 void | 529 void |
534 AudioCallbackPlaySource::selectionChanged() | 530 AudioCallbackPlaySource::selectionChanged() |
535 { | 531 { |