From 8bcd9ea67169a2ba9afd016648f47631717addff Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 29 Apr 2015 22:39:58 +0200 Subject: ao_coreaudio_utils: log mp format with CoreAudio format description As a consequence, it also logs whether mpv can a this format at all. (cherry picked from commit 34a5229b231f15c95876fed472bd1edc5283db31) --- audio/out/ao_coreaudio_utils.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/audio/out/ao_coreaudio_utils.c b/audio/out/ao_coreaudio_utils.c index 85437c0b55..21ffbf0dc8 100644 --- a/audio/out/ao_coreaudio_utils.c +++ b/audio/out/ao_coreaudio_utils.c @@ -247,12 +247,13 @@ void ca_print_asbd(struct ao *ao, const char *description, { uint32_t flags = asbd->mFormatFlags; char *format = fourcc_repr(NULL, asbd->mFormatID); + int mpfmt = ca_asbd_to_mp_format(asbd); MP_VERBOSE(ao, "%s %7.1fHz %" PRIu32 "bit %s " "[%" PRIu32 "][%" PRIu32 "bpp][%" PRIu32 "fbp]" "[%" PRIu32 "bpf][%" PRIu32 "ch] " - "%s %s %s%s%s%s\n", + "%s %s %s%s%s%s (%s)\n", description, asbd->mSampleRate, asbd->mBitsPerChannel, format, asbd->mFormatFlags, asbd->mBytesPerPacket, asbd->mFramesPerPacket, asbd->mBytesPerFrame, asbd->mChannelsPerFrame, @@ -261,7 +262,8 @@ void ca_print_asbd(struct ao *ao, const char *description, (flags & kAudioFormatFlagIsSignedInteger) ? "S" : "U", (flags & kAudioFormatFlagIsPacked) ? " packed" : "", (flags & kAudioFormatFlagIsAlignedHigh) ? " aligned" : "", - (flags & kAudioFormatFlagIsNonInterleaved) ? " P" : ""); + (flags & kAudioFormatFlagIsNonInterleaved) ? " P" : "", + mpfmt ? af_fmt_to_str(mpfmt) : "unusable"); talloc_free(format); } -- cgit v1.2.3