Skip to content

Commit

Permalink
Clean up after render in ProjectRenderer destructor
Browse files Browse the repository at this point in the history
We need to wait with calling Mixer::restoreAudioDevice() and
Mixer::changeQuality() after render until all threads have stopped.
Moving these calls to ProjectRenderer::~ProjectRenderer() ensures
all render theads are done.
  • Loading branch information
zonkmachine committed Jul 3, 2017
1 parent 494714b commit ab57d63
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/ProjectRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ ProjectRenderer::ProjectRenderer( const Mixer::qualitySettings & qualitySettings

ProjectRenderer::~ProjectRenderer()
{
Engine::mixer()->restoreAudioDevice(); // also deletes audio-dev
Engine::mixer()->changeQuality( m_oldQualitySettings );
}


Expand Down Expand Up @@ -203,9 +205,6 @@ void ProjectRenderer::run()

const QString f = m_fileDev->outputFile();

Engine::mixer()->restoreAudioDevice(); // also deletes audio-dev
Engine::mixer()->changeQuality( m_oldQualitySettings );

// if the user aborted export-process, the file has to be deleted
if( m_abort )
{
Expand Down

0 comments on commit ab57d63

Please sign in to comment.