From 46b9df9f9e1eec5cdaa03ab842b34cf1f2ad9ece Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Thu, 2 Apr 2015 22:01:51 -0700 Subject: audio: make all format query shortcuts macros af_fmt_is_float and af_fmt_is_planar were previously inconsistent with AF_FORAMT_IS_SPECIAL/AF_FORMAT_IS_IEC61937 --- audio/format.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'audio/format.c') diff --git a/audio/format.c b/audio/format.c index 7f9cb1477e..a25682e7e2 100644 --- a/audio/format.c +++ b/audio/format.c @@ -45,11 +45,6 @@ int af_fmt2bits(int format) return af_fmt2bps(format) * 8; } -bool af_fmt_is_float(int format) -{ - return !!(format & AF_FORMAT_F); -} - static int bits_to_mask(int bits) { switch (bits) { @@ -105,12 +100,6 @@ int af_fmt_from_planar(int format) return format; } -// false for interleaved and AF_FORMAT_UNKNOWN -bool af_fmt_is_planar(int format) -{ - return !!(format & AF_FORMAT_PLANAR); -} - const struct af_fmt_entry af_fmtstr_table[] = { {"u8", AF_FORMAT_U8}, {"s8", AF_FORMAT_S8}, @@ -161,7 +150,7 @@ const char *af_fmt_to_str(int format) int af_fmt_seconds_to_bytes(int format, float seconds, int channels, int samplerate) { - assert(!af_fmt_is_planar(format)); + assert(!AF_FORMAT_IS_PLANAR(format)); int bps = af_fmt2bps(format); int framelen = channels * bps; int bytes = seconds * bps * samplerate; -- cgit v1.2.3