output/osx: don't uninitialize AudioUnit if restart fails
This shall be done by Close(), which will be called automatically after an error.
This commit is contained in:
		| @@ -763,10 +763,9 @@ OSXOutput::Play(const void *chunk, size_t size) | |||||||
| 	assert(size > 0); | 	assert(size > 0); | ||||||
| 	if (pause) { | 	if (pause) { | ||||||
| 		OSStatus status = AudioOutputUnitStart(au); | 		OSStatus status = AudioOutputUnitStart(au); | ||||||
| 		if (status != 0) { | 		if (status != noErr) | ||||||
| 			AudioUnitUninitialize(au); |  | ||||||
| 			throw std::runtime_error("Unable to restart audio output after pause"); | 			throw std::runtime_error("Unable to restart audio output after pause"); | ||||||
| 		} |  | ||||||
| 		pause = false; | 		pause = false; | ||||||
| 	} | 	} | ||||||
| #ifdef ENABLE_DSD | #ifdef ENABLE_DSD | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Max Kellermann
					Max Kellermann