oss: Use the correct fd when interacting with the mixer

Adapted from a FreeBSD patch:
http://svnweb.freebsd.org/ports/head/audio/pulseaudio/files/patch-src_modules_oss_module-oss.c?revision=372768&view=markup
This commit is contained in:
Tanu Kaskinen 2015-04-30 13:21:02 +03:00
parent bae15c420a
commit 2737985f27

View file

@ -1426,7 +1426,7 @@ int pa__init(pa_module*m) {
if ((u->mixer_fd = pa_oss_open_mixer_for_device(u->device_name)) >= 0) {
bool do_close = true;
if (ioctl(fd, SOUND_MIXER_READ_DEVMASK, &u->mixer_devmask) < 0)
if (ioctl(u->mixer_fd, SOUND_MIXER_READ_DEVMASK, &u->mixer_devmask) < 0)
pa_log_warn("SOUND_MIXER_READ_DEVMASK failed: %s", pa_cstrerror(errno));
else {
if (u->sink && (u->mixer_devmask & (SOUND_MASK_VOLUME|SOUND_MASK_PCM))) {