diff options
author | wm4 <wm4@nowhere> | 2015-06-26 23:06:37 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-06-26 23:06:37 +0200 |
commit | 6147bcce359358855ad02d8d5cbd6575d39b0449 (patch) | |
tree | 5cb8bafc418cd71b68f95766ad01b3312feed518 /audio/out/ao.c | |
parent | d6737c5fab489964558b1eed934969c4f151912d (diff) | |
download | mpv-6147bcce359358855ad02d8d5cbd6575d39b0449.tar.bz2 mpv-6147bcce359358855ad02d8d5cbd6575d39b0449.tar.xz |
audio: fix format function consistency issues
Replace all the check macros with function calls. Give them all the
same case and naming schema.
Drop af_fmt2bits(). Only af_fmt2bps() survives as af_fmt_to_bytes().
Introduce af_fmt_is_pcm(), and use it in situations that used
!AF_FORMAT_IS_SPECIAL. Nobody really knew what a "special" format
was. It simply meant "not PCM".
Diffstat (limited to 'audio/out/ao.c')
-rw-r--r-- | audio/out/ao.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/out/ao.c b/audio/out/ao.c index c1333ab584..abf50b6b81 100644 --- a/audio/out/ao.c +++ b/audio/out/ao.c @@ -196,9 +196,9 @@ static struct ao *ao_init(bool probing, struct mpv_global *global, goto fail; } - ao->sstride = af_fmt2bps(ao->format); + ao->sstride = af_fmt_to_bytes(ao->format); ao->num_planes = 1; - if (AF_FORMAT_IS_PLANAR(ao->format)) { + if (af_fmt_is_planar(ao->format)) { ao->num_planes = ao->channels.num; } else { ao->sstride *= ao->channels.num; |