mirror of https://github.com/mpv-player/mpv
ao_alsa: remove some dead code
This was only added recently (c1e97161
) as an attempt to minimize the bad impact of channel layout device aliases. But use of these was removed in commit49df0132
. Now this code does pretty much nothing, and shouldn't be needed anymore. It does something when using spdif, but this fallback won't work anyway.
This commit is contained in:
parent
5b32f30aa1
commit
0dc455eb16
|
@ -416,21 +416,15 @@ static int init_device(struct ao *ao)
|
|||
MP_VERBOSE(ao, "playing AC3/iec61937/iec958, %i channels\n",
|
||||
ao->channels.num);
|
||||
}
|
||||
const char *old_dev = device;
|
||||
if (ao->device)
|
||||
device = ao->device;
|
||||
if (p->cfg_device && p->cfg_device[0])
|
||||
device = p->cfg_device;
|
||||
bool user_set_device = device != old_dev; // not strcmp()
|
||||
|
||||
MP_VERBOSE(ao, "using device: %s\n", device);
|
||||
MP_VERBOSE(ao, "using ALSA version: %s\n", snd_asoundlib_version());
|
||||
|
||||
err = try_open_device(ao, device);
|
||||
if (err == -EBUSY && !user_set_device && strcmp(device, "default") != 0) {
|
||||
MP_WARN(ao, "Device '%s' busy, retrying default.\n", device);
|
||||
err = try_open_device(ao, "default");
|
||||
}
|
||||
CHECK_ALSA_ERROR("Playback open error");
|
||||
|
||||
err = snd_pcm_nonblock(p->alsa, 0);
|
||||
|
|
Loading…
Reference in New Issue