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

coreaudio: redirect IEC61937 to coreaudio_exclusive

This commit is contained in:
Stefano Pigozzi 2014-10-23 09:16:39 +02:00
parent 32720cdc17
commit f8d0a75b50
2 changed files with 7 additions and 1 deletions

View File

@ -145,6 +145,12 @@ static bool init_audiounit(struct ao *ao, AudioStreamBasicDescription asbd);
static int init(struct ao *ao)
{
if (AF_FORMAT_IS_IEC61937(ao->format)) {
MP_WARN(ao, "detected IEC61937, redirecting to coreaudio_exclusive\n");
ao->redirect = "coreaudio_exclusive";
return CONTROL_ERROR;
}
struct priv *p = ao->priv;
OSStatus err = ca_select_device(ao, ao->device, &p->device);

View File

@ -56,7 +56,7 @@ OSStatus ca_select_device(struct ao *ao, char* name, AudioDeviceID *device)
int selection = name ? strtol(name, (char **)NULL, 10) : -1;
if (errno == EINVAL || errno == ERANGE) {
selection = -1;
MP_ERR(ao, "device identifier '%s' is invalid\n", name);
MP_WARN(ao, "device identifier '%s' is invalid\n", name);
}
*device = 0;
if (selection < 0) {