From 2006069ca22c425e7a0b83e01f44f7919884a98c Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Fri, 28 Nov 2014 02:00:17 -0800 Subject: ao/format: add af_fmt_is_float --- audio/format.c | 5 +++++ audio/format.h | 1 + 2 files changed, 6 insertions(+) (limited to 'audio') diff --git a/audio/format.c b/audio/format.c index 618a00e0c1..08b369c090 100644 --- a/audio/format.c +++ b/audio/format.c @@ -45,6 +45,11 @@ 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) { diff --git a/audio/format.h b/audio/format.h index 06c5d566e5..b3ac0000c8 100644 --- a/audio/format.h +++ b/audio/format.h @@ -109,6 +109,7 @@ 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); -- cgit v1.2.3