Mercurial > hg > svcore
diff plugin/DSSIPluginInstance.cpp @ 11:cb05ba39664a
* Fixes to playback of short looped files, of synthesised content within looped
sections, and a few other fixes
author | Chris Cannam |
---|---|
date | Thu, 26 Jan 2006 11:56:09 +0000 |
parents | ec6886f0e673 |
children | 2fb933f88604 |
line wrap: on
line diff
--- a/plugin/DSSIPluginInstance.cpp Wed Jan 25 17:46:28 2006 +0000 +++ b/plugin/DSSIPluginInstance.cpp Thu Jan 26 11:56:09 2006 +0000 @@ -789,8 +789,20 @@ DSSIPluginInstance::sendEvent(const RealTime &eventTime, const void *e) { +#ifdef DEBUG_DSSI_PROCESS + std::cerr << "DSSIPluginInstance::sendEvent: last was " << m_lastEventSendTime << " (valid " << m_haveLastEventSendTime << "), this is " << eventTime << std::endl; +#endif + + // The process mechanism only works correctly if the events are + // sorted. It's the responsibility of the caller to ensure that: + // we will happily drop events here if we find the timeline going + // backwards. if (m_haveLastEventSendTime && m_lastEventSendTime > eventTime) { +#ifdef DEBUG_DSSI_PROCESS + std::cerr << "... clearing down" << std::endl; +#endif + m_haveLastEventSendTime = false; clearEvents(); } @@ -807,6 +819,9 @@ ev.data.note.channel = 0; m_eventBuffer.write(&ev, 1); + + m_lastEventSendTime = eventTime; + m_haveLastEventSendTime = true; } void