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.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'audio/format.h') diff --git a/audio/format.h b/audio/format.h index 910b952fd2..5d41b2e3f1 100644 --- a/audio/format.h +++ b/audio/format.h @@ -96,6 +96,9 @@ enum af_format { #define AF_FORMAT_IS_IEC61937(f) (((f) & AF_FORMAT_TYPE_MASK) == AF_FORMAT_S) #define AF_FORMAT_IS_SPECIAL(f) AF_FORMAT_IS_IEC61937(f) +#define AF_FORMAT_IS_FLOAT(f) (!!((f) & AF_FORMAT_F)) +// false for interleaved and AF_FORMAT_UNKNOWN +#define AF_FORMAT_IS_PLANAR(f) (!!((f) & AF_FORMAT_PLANAR)) struct af_fmt_entry { const char *name; @@ -109,12 +112,10 @@ const char *af_fmt_to_str(int format); int af_fmt2bps(int format); int af_fmt2bits(int format); -bool af_fmt_is_float(int format); int af_fmt_change_bits(int format, int bits); int af_fmt_to_planar(int format); int af_fmt_from_planar(int format); -bool af_fmt_is_planar(int format); // Amount of bytes that contain audio of the given duration, aligned to frames. int af_fmt_seconds_to_bytes(int format, float seconds, int channels, int samplerate); -- cgit v1.2.3