output/Control: unlock mutex during expensive operations
This commit is contained in:
		@@ -226,6 +226,7 @@ AudioOutputControl::Open(const AudioFormat audio_format,
 | 
			
		||||
	const bool open2 = open;
 | 
			
		||||
 | 
			
		||||
	if (open2 && output->mixer != nullptr) {
 | 
			
		||||
		const ScopeUnlock unlock(mutex);
 | 
			
		||||
		try {
 | 
			
		||||
			mixer_open(output->mixer);
 | 
			
		||||
		} catch (...) {
 | 
			
		||||
 
 | 
			
		||||
@@ -501,5 +501,6 @@ AudioOutputControl::StartThread()
 | 
			
		||||
{
 | 
			
		||||
	assert(command == Command::NONE);
 | 
			
		||||
 | 
			
		||||
	const ScopeUnlock unlock(mutex);
 | 
			
		||||
	thread.Start();
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user