From 3295ce48ab4badff0e13e2e9c2a1ec945413d4e2 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 29 Apr 2015 22:39:28 +0200 Subject: ao_coreaudio_utils: float is not a signed integer format kAudioFormatFlagIsSignedInteger implicates that it's only used with integer formats. The mpv internal flag on the other hand signals the presence of a sign, and this is set on float formats. Until now, this probably worked fine, because at least AudioUnit is ignoring the uncorrect flag. --- audio/out/ao_coreaudio_utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'audio/out/ao_coreaudio_utils.c') diff --git a/audio/out/ao_coreaudio_utils.c b/audio/out/ao_coreaudio_utils.c index 9b5b663ee9..d175585167 100644 --- a/audio/out/ao_coreaudio_utils.c +++ b/audio/out/ao_coreaudio_utils.c @@ -178,11 +178,11 @@ void ca_fill_asbd(struct ao *ao, AudioStreamBasicDescription *asbd) asbd->mBitsPerChannel = af_fmt2bits(ao->format); asbd->mFormatFlags = kAudioFormatFlagIsPacked; - if ((ao->format & AF_FORMAT_TYPE_MASK) == AF_FORMAT_F) + if ((ao->format & AF_FORMAT_TYPE_MASK) == AF_FORMAT_F) { asbd->mFormatFlags |= kAudioFormatFlagIsFloat; - - if ((ao->format & AF_FORMAT_SIGN_MASK) == AF_FORMAT_SI) + } else if ((ao->format & AF_FORMAT_SIGN_MASK) == AF_FORMAT_SI) { asbd->mFormatFlags |= kAudioFormatFlagIsSignedInteger; + } if (BYTE_ORDER == BIG_ENDIAN) asbd->mFormatFlags |= kAudioFormatFlagIsBigEndian; -- cgit v1.2.3