diff options
author | Kevin Mitchell <kevmitch@gmail.com> | 2014-11-28 02:00:17 -0800 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2014-12-01 03:40:23 -0800 |
commit | 2006069ca22c425e7a0b83e01f44f7919884a98c (patch) | |
tree | 8d438021f562d63de3420c6bf485816bb483c542 | |
parent | 96fa3ebd1ace54666f32a27e807faab4df18590e (diff) |
ao/format: add af_fmt_is_float
-rw-r--r-- | audio/format.c | 5 | ||||
-rw-r--r-- | audio/format.h | 1 |
2 files changed, 6 insertions, 0 deletions
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); |