Mercurial > hg > svapp
diff audioio/AudioCallbackPlaySource.cpp @ 10:b6dc944128da
* Add basics of MIDI file import. Doesn't actually create the model yet.
* Add rewind to start / ffwd to end.
* Make zoom constraint default to sqrt(2) type if no constraint set
author | Chris Cannam |
---|---|
date | Thu, 09 Feb 2006 18:01:52 +0000 |
parents | e71385792d9d |
children | 29b38a641d43 |
line wrap: on
line diff
--- a/audioio/AudioCallbackPlaySource.cpp Wed Feb 08 17:59:16 2006 +0000 +++ b/audioio/AudioCallbackPlaySource.cpp Thu Feb 09 18:01:52 2006 +0000 @@ -80,7 +80,7 @@ void AudioCallbackPlaySource::addModel(Model *model) { - m_audioGenerator->addModel(model); + bool canPlay = m_audioGenerator->addModel(model); m_mutex.lock(); @@ -122,7 +122,7 @@ clearRingBuffers(true, modelChannels); buffersChanged = true; } else { - clearRingBuffers(true); + if (canPlay) clearRingBuffers(true); } if (buffersChanged || srChanged) {