Mercurial > hg > svapp
comparison audioio/AudioCallbackPlaySource.cpp @ 414:b65ee5c4f8bc
Refuse to play if no sample rate available (fixes crash when playing after deleting only pane)
author | Chris Cannam |
---|---|
date | Fri, 12 Sep 2014 16:59:52 +0100 |
parents | ddfb480c70a0 |
children | 8d2112977aa0 dee4aceb131c |
comparison
equal
deleted
inserted
replaced
413:a39a7d6b0f2d | 414:b65ee5c4f8bc |
---|---|
397 } | 397 } |
398 | 398 |
399 void | 399 void |
400 AudioCallbackPlaySource::play(int startFrame) | 400 AudioCallbackPlaySource::play(int startFrame) |
401 { | 401 { |
402 if (!m_sourceSampleRate) { | |
403 cerr << "AudioCallbackPlaySource::play: No source sample rate available, not playing" << endl; | |
404 return; | |
405 } | |
406 | |
402 if (m_viewManager->getPlaySelectionMode() && | 407 if (m_viewManager->getPlaySelectionMode() && |
403 !m_viewManager->getSelections().empty()) { | 408 !m_viewManager->getSelections().empty()) { |
404 | 409 |
405 SVDEBUG << "AudioCallbackPlaySource::play: constraining frame " << startFrame << " to selection = "; | 410 SVDEBUG << "AudioCallbackPlaySource::play: constraining frame " << startFrame << " to selection = "; |
406 | 411 |