From 0cffd98e8ebf9d0b440e1804548465ea8839a7cb Mon Sep 17 00:00:00 2001 From: bugmen0t <@> Date: Mon, 4 Nov 2013 20:54:11 +0000 Subject: ao_oss: make no_persistent_volume volume work when seeking --- audio/out/ao_oss.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'audio/out/ao_oss.c') diff --git a/audio/out/ao_oss.c b/audio/out/ao_oss.c index c22d15211f..efede703c2 100644 --- a/audio/out/ao_oss.c +++ b/audio/out/ao_oss.c @@ -414,6 +414,9 @@ static void reset(struct ao *ao) { struct priv *p = ao->priv; int oss_format; +#ifdef SNDCTL_DSP_RESET + ioctl(p->audio_fd, SNDCTL_DSP_RESET, NULL); +#else close_device(ao); p->audio_fd = open(p->dsp, O_WRONLY); if (p->audio_fd < 0) { @@ -424,6 +427,7 @@ static void reset(struct ao *ao) #if defined(FD_CLOEXEC) && defined(F_SETFD) fcntl(p->audio_fd, F_SETFD, FD_CLOEXEC); +#endif #endif oss_format = format2oss(ao->format); -- cgit v1.2.3