diff options
author | wm4 <wm4@nowhere> | 2015-04-29 22:39:28 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-04-29 22:39:28 +0200 |
commit | 3295ce48ab4badff0e13e2e9c2a1ec945413d4e2 (patch) | |
tree | 16dd4d79714c3db7ba34b25da0322771b9fe8cab /audio/out/ao_coreaudio_utils.c | |
parent | 99439f11ea6add0996adc6f5fb04bb7d27da265e (diff) | |
download | mpv-3295ce48ab4badff0e13e2e9c2a1ec945413d4e2.tar.bz2 mpv-3295ce48ab4badff0e13e2e9c2a1ec945413d4e2.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.
Diffstat (limited to 'audio/out/ao_coreaudio_utils.c')
-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; |