Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't count muted tracks in track length #3390

Merged
merged 2 commits into from Mar 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/ProjectRenderer.cpp
Expand Up @@ -167,8 +167,8 @@ void ProjectRenderer::run()
#endif
#endif


Engine::getSong()->startExport();
Engine::getSong()->updateLength();
//skip first empty buffer
Engine::mixer()->nextBuffer();

Expand Down
6 changes: 6 additions & 0 deletions src/core/Song.cpp
Expand Up @@ -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 )
{
Expand Down
6 changes: 6 additions & 0 deletions src/core/Track.cpp
Expand Up @@ -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 )
{
Expand Down