output/wasapi: check AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED
Stop early, don't try more formats if it is clear that we have no chance.
This commit is contained in:
		| @@ -642,6 +642,9 @@ bool WasapiOutput::TryFormatExclusive(const AudioFormat &audio_format) { | |||||||
| 			device_format = test_format; | 			device_format = test_format; | ||||||
| 			return true; | 			return true; | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
|  | 		if (result == AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED) | ||||||
|  | 			throw std::runtime_error("Exclusive mode not allowed"); | ||||||
| 	} | 	} | ||||||
| 	return false; | 	return false; | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Max Kellermann
					Max Kellermann