summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_alsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/out/ao_alsa.c')
-rw-r--r--audio/out/ao_alsa.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c
index bdfd8fae76..5816ee5f5f 100644
--- a/audio/out/ao_alsa.c
+++ b/audio/out/ao_alsa.c
@@ -78,7 +78,6 @@ struct priv {
} while (0)
static float get_delay(struct ao *ao);
-static int play(struct ao *ao, void *data, int len, int flags);
static void uninit(struct ao *ao, bool immed);
static void alsa_error_handler(const char *file, int line, const char *function,
@@ -612,11 +611,8 @@ static void audio_resume(struct ao *ao)
MP_VERBOSE(ao, "resume not supported by hardware\n");
err = snd_pcm_prepare(p->alsa);
CHECK_ALSA_ERROR("pcm prepare error");
- if (p->prepause_frames) {
- void *silence = calloc(p->prepause_frames, p->bytes_per_sample);
- play(ao, silence, p->prepause_frames * p->bytes_per_sample, 0);
- free(silence);
- }
+ if (p->prepause_frames)
+ ao_play_silence(ao, p->prepause_frames);
}
alsa_error: ;