diff options
author | wm4 <wm4@nowhere> | 2015-04-29 22:39:28 +0200 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-05-07 10:40:53 +0900 |
commit | 047c761f902180294d4bf27debf6e3fdbb4d06e1 (patch) | |
tree | 8292ca268ee753b92ef73ba998448337d5037fc0 /audio | |
parent | 99389eb174a7c5b489a7f044c9765e668ccff6f9 (diff) | |
download | mpv-047c761f902180294d4bf27debf6e3fdbb4d06e1.tar.bz2 mpv-047c761f902180294d4bf27debf6e3fdbb4d06e1.tar.xz |
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.
(cherry picked from commit 3295ce48ab4badff0e13e2e9c2a1ec945413d4e2)
Diffstat (limited to 'audio')
-rw-r--r-- | audio/out/ao_coreaudio_utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |