mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 12:02:23 +02:00
ao_coreaudio: change physical stream format synchronously
This commit is contained in:
parent
211088943c
commit
b7d833c2a6
@ -224,10 +224,7 @@ static void init_physical_format(struct ao *ao)
|
|||||||
&p->original_asbd);
|
&p->original_asbd);
|
||||||
CHECK_CA_WARN("could not get current physical stream format");
|
CHECK_CA_WARN("could not get current physical stream format");
|
||||||
|
|
||||||
ca_print_asbd(ao, "Trying to set physical format:", &best_asbd);
|
ca_change_physical_format_sync(ao, streams[i], best_asbd);
|
||||||
err = CA_SET(streams[i], kAudioStreamPropertyPhysicalFormat,
|
|
||||||
&best_asbd);
|
|
||||||
CHECK_CA_ERROR("could not set physical format");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -456,7 +456,7 @@ bool ca_change_physical_format_sync(struct ao *ao, AudioStreamID stream,
|
|||||||
OSStatus err = noErr;
|
OSStatus err = noErr;
|
||||||
bool format_set = false;
|
bool format_set = false;
|
||||||
|
|
||||||
ca_print_asbd(ao, "setting stream format:", &change_format);
|
ca_print_asbd(ao, "setting stream physical format:", &change_format);
|
||||||
|
|
||||||
sem_t wakeup;
|
sem_t wakeup;
|
||||||
if (sem_init(&wakeup, 0, 0)) {
|
if (sem_init(&wakeup, 0, 0)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user