Don't restore audio device during exporting #4083
Conversation
Fixes deadlock on multi-track export with SDL
@@ -630,6 +627,17 @@ void Mixer::setAudioDevice( AudioDevice * _dev, | |||
|
|||
|
|||
|
|||
void Mixer::storeAudioDevice() | |||
{ | |||
if( !m_oldAudioDev ) |
PhysSong
Jan 10, 2018
Author
Member
I've included this check, but looks redundant. Maybe removing is better?
I've included this check, but looks redundant. Maybe removing is better?
@@ -103,8 +102,6 @@ ProjectRenderer::ProjectRenderer( const Mixer::qualitySettings & qualitySettings | |||
|
|||
ProjectRenderer::~ProjectRenderer() | |||
{ | |||
Engine::mixer()->restoreAudioDevice(); // also deletes audio-dev | |||
Engine::mixer()->changeQuality( m_oldQualitySettings ); |
zonkmachine
Jan 11, 2018
Member
Make sure #3680 still works. If these test projects renders, as instructed, it's a 'go' from me.
Make sure #3680 still works. If these test projects renders, as instructed, it's a 'go' from me.
PhysSong
Jan 11, 2018
Author
Member
@zonkmachine I'm pretty sure #3680 will still work because RenderManager
destructor is called after ProjectRenderer
destructor. However, testing is always good. I'll double-check it!
@zonkmachine I'm pretty sure #3680 will still work because RenderManager
destructor is called after ProjectRenderer
destructor. However, testing is always good. I'll double-check it!
zonkmachine
Jan 17, 2018
Member
OK. I think you should merge.
OK. I think you should merge.
Tested, works! |
Merge? |
I've managed to get it hung on the last step but can't replicate it. I don't know if I had #4189 cherry-picked on top when this happened or not. I think so but it seem to work fine generally, with or without it.
|
@zonkmachine What is the backtrace? When did you get that? |
The backtrace is from crashing/freezing at the end of rendering the project Ashore to separate tracks. I can't replicate this however and think I may have confused this branch and stable-1.2 as I would probably have tested the later to replicate the issue prior to testing the fix. The differences between the logs seem to be that this one is after the very last track is finished rendering and the one in #4032 (comment) is after rendering some two tracks or so. I think we can ignore this backtrace and merge #4083. |
The backtrace seems to be from this PR. However, the problem looks like a separate issue and an edge case. I think I can fix that, but probably in another PR. |
OK. Merge? |
I'll do that soon once Travis-CI build finishes. |
This PR fixes deadlock on multi-track export with SDL.
Fixes #4032.