summaryrefslogtreecommitdiffstats
path: root/audio/out
diff options
context:
space:
mode:
Diffstat (limited to 'audio/out')
-rw-r--r--audio/out/ao_oss.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/audio/out/ao_oss.c b/audio/out/ao_oss.c
index 0890f11e0a..5050f9771f 100644
--- a/audio/out/ao_oss.c
+++ b/audio/out/ao_oss.c
@@ -476,7 +476,11 @@ static void audio_pause(struct ao *ao)
{
struct priv *p = ao->priv;
p->prepause_space = get_space(ao);
+#ifdef SNDCTL_DSP_RESET
+ ioctl(p->audio_fd, SNDCTL_DSP_RESET, NULL);
+#else
close_device(ao);
+#endif
}
// plays 'len' bytes of 'data'
@@ -500,7 +504,9 @@ static void audio_resume(struct ao *ao)
{
struct priv *p = ao->priv;
int fillcnt;
+#ifndef SNDCTL_DSP_RESET
reset(ao);
+#endif
fillcnt = get_space(ao) - p->prepause_space;
if (fillcnt > 0 && !(ao->format & AF_FORMAT_SPECIAL_MASK)) {
void *silence = calloc(fillcnt, 1);