diff options
author | Kevin Mitchell <kevmitch@gmail.com> | 2015-04-02 22:01:51 -0700 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2015-04-03 15:40:01 -0700 |
commit | 46b9df9f9e1eec5cdaa03ab842b34cf1f2ad9ece (patch) | |
tree | eae7a659723e84dc6382cc4a011aa1809342c97c /audio/format.c | |
parent | 07671ac57b41710201e9a0f22b8a8d0febad1c37 (diff) | |
download | mpv-46b9df9f9e1eec5cdaa03ab842b34cf1f2ad9ece.tar.bz2 mpv-46b9df9f9e1eec5cdaa03ab842b34cf1f2ad9ece.tar.xz |
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
Diffstat (limited to 'audio/format.c')
-rw-r--r-- | audio/format.c | 13 |
1 files changed, 1 insertions, 12 deletions
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; |