From 3cb4116243e54b0452d88c70a7acd4af17cf8d02 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 10 Nov 2013 23:05:51 +0100 Subject: ao: add ao_play_silence, use for ao_alsa and ao_oss Also add a corresponding function to audio/format.c, which fills an audio block with silence. --- audio/format.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'audio/format.h') diff --git a/audio/format.h b/audio/format.h index 3a80a601c5..95e792340c 100644 --- a/audio/format.h +++ b/audio/format.h @@ -134,6 +134,9 @@ enum af_format { (AF_FORMAT_IS_AC3(fmt) || \ ((fmt) & AF_FORMAT_SPECIAL_MASK) == AF_FORMAT_S_IEC61937) +#define AF_FORMAT_IS_SPECIAL(fmt) \ + ((fmt & AF_FORMAT_SPECIAL_MASK) != 0) + struct af_fmt_entry { const char *name; int format; @@ -152,4 +155,6 @@ int af_fmt_seconds_to_bytes(int format, float seconds, int channels, int sampler bool af_fmt_is_valid(int format); +void af_fill_silence(void *dst, size_t bytes, int format); + #endif /* MPLAYER_AF_FORMAT_H */ -- cgit v1.2.3