0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

ao_coreaudio: raise timeout for change-physical-format

Reportedly fixes operation with "USB connected Parasound ZDAC v.2". (OSX
and USB audio sure is not nice at all.)

This might be perceived as hang by some users, so it's quite possible
that this will have to be adjusted again somehow.

Fixes #2409.
This commit is contained in:
wm4 2015-10-20 00:17:54 +02:00
parent 251107076b
commit e157d005ba

View File

@ -523,7 +523,7 @@ bool ca_change_physical_format_sync(struct ao *ao, AudioStreamID stream,
/* The AudioStreamSetProperty is not only asynchronous, /* The AudioStreamSetProperty is not only asynchronous,
* it is also not Atomic, in its behaviour. */ * it is also not Atomic, in its behaviour. */
struct timespec timeout = mp_rel_time_to_timespec(0.5); struct timespec timeout = mp_rel_time_to_timespec(2.0);
AudioStreamBasicDescription actual_format = {0}; AudioStreamBasicDescription actual_format = {0};
while (1) { while (1) {
err = CA_GET(stream, kAudioStreamPropertyPhysicalFormat, &actual_format); err = CA_GET(stream, kAudioStreamPropertyPhysicalFormat, &actual_format);