Render between loop markers

This commit is contained in:
Dave French
2014-12-21 19:59:29 +00:00
parent 0bbc963ee2
commit 8f12d483a7
2 changed files with 26 additions and 14 deletions

View File

@@ -34,6 +34,7 @@
#include "MeterModel.h"
#include "VstSyncController.h"
class AutomationTrack;
class Pattern;
class Timeline;
@@ -169,19 +170,8 @@ public:
return m_recording;
}
inline bool isExportDone() const
{
if ( m_exportLoop )
{
return m_exporting == true &&
m_playPos[Mode_PlaySong].getTicks() >= length() * ticksPerTact();
}
else
{
return m_exporting == true &&
m_playPos[Mode_PlaySong].getTicks() >= ( length() + 1 ) * ticksPerTact();
}
}
bool isExportDone() const;
inline PlayModes playMode() const
{

View File

@@ -386,6 +386,21 @@ void Song::processNextBuffer()
}
}
bool Song::isExportDone() const
{
if ( m_exportLoop )
{
return m_exporting == true &&
m_playPos[Mode_PlaySong].getTicks() >= m_playPos[Mode_PlaySong].m_timeLine->loopEnd().getTicks();
}
else
{
return m_exporting == true &&
m_playPos[Mode_PlaySong].getTicks() >= ( length() + 1 ) * ticksPerTact();
}
}
@@ -619,7 +634,14 @@ void Song::stop()
void Song::startExport()
{
stop();
m_playPos[Mode_PlaySong].setTicks( 0 );
if(m_exportLoop)
{
m_playPos[Mode_PlaySong].setTicks( m_playPos[Mode_PlaySong].m_timeLine->loopBegin().getTicks() );
}
else
{
m_playPos[Mode_PlaySong].setTicks( 0 );
}
playSong();