mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
99439f11ea
commit
3295ce48ab
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue