-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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 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 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure #3680 still works. If these test projects renders, as instructed, it's a 'go' from me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zonkmachine Tested. It still works!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I think you should merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, works!
I don't have insight enough to review the code. It looks mighty fine though.
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. |
Fixes deadlock on multi-track export with SDL
This PR fixes deadlock on multi-track export with SDL.
Fixes #4032.