diff options
author | bugmen0t <@> | 2013-11-04 20:54:11 +0000 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-06 20:31:36 +0100 |
commit | 0cffd98e8ebf9d0b440e1804548465ea8839a7cb (patch) | |
tree | 9985bc9ee77cd705980127d39dea37425ced18d9 /audio/out/ao_oss.c | |
parent | d445147be9abe51c5ed462a878c7d50d97d4b98e (diff) | |
download | mpv-0cffd98e8ebf9d0b440e1804548465ea8839a7cb.tar.bz2 mpv-0cffd98e8ebf9d0b440e1804548465ea8839a7cb.tar.xz |
ao_oss: make no_persistent_volume volume work when seeking
Diffstat (limited to 'audio/out/ao_oss.c')
-rw-r--r-- | audio/out/ao_oss.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) { @@ -425,6 +428,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); if (AF_FORMAT_IS_AC3(ao->format)) |