Don't count muted tracks in track length (#3390)

* Don't count muted tracks to length on render

* Don't count muted TCO's to length on render
This commit is contained in:
Oskar Wallgren
2017-03-01 07:27:43 +01:00
committed by GitHub
parent 8283e3f456
commit 06e4033cb9
3 changed files with 13 additions and 1 deletions

View File

@@ -167,8 +167,8 @@ void ProjectRenderer::run()
#endif
#endif
Engine::getSong()->startExport();
Engine::getSong()->updateLength();
//skip first empty buffer
Engine::mixer()->nextBuffer();

View File

@@ -555,6 +555,12 @@ void Song::updateLength()
for( TrackList::const_iterator it = tracks().begin();
it != tracks().end(); ++it )
{
if( Engine::getSong()->isExporting() &&
( *it )->isMuted() )
{
continue;
}
const tact_t cur = ( *it )->length();
if( cur > m_length )
{

View File

@@ -2421,6 +2421,12 @@ tact_t Track::length() const
for( tcoVector::const_iterator it = m_trackContentObjects.begin();
it != m_trackContentObjects.end(); ++it )
{
if( Engine::getSong()->isExporting() &&
( *it )->isMuted() )
{
continue;
}
const tick_t cur = ( *it )->endPosition();
if( cur > last )
{