Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

[osx] fixed: incorrect mFormatFlags set for S16LE #976

Merged
merged 1 commit into from Jul 10, 2012

Conversation

Projects
None yet
2 participants
Member

anssih commented May 17, 2012

CCoreAudioUnit::GetFormatDesc() currently sets
kAudioFormatFlagsNativeEndian for AE_FMT_S16LE.

However, S16LE is always little-endian, not native-endian, so that flag
shouldn't be set.

This incorrect value presumably didn't cause widespread issues because
on little-endian systems S16LE is also native-endian, so the code did
nothing (as kAudioFormatFlagsNativeEndian is zero), and on big-endian
systems we normally output S16BE instead of S16LE, so the codepath was
not hit.

Note that I haven't tested this, just noticed the bug when looking at the code.
So please check everything still works before pulling :)

[osx] fixed: incorrect mFormatFlags set for S16LE
CCoreAudioUnit::GetFormatDesc() currently sets
kAudioFormatFlagsNativeEndian for AE_FMT_S16LE.

However, S16LE is always little-endian, not native-endian, so that flag
shouldn't be set.

This incorrect value presumably didn't cause widespread issues because
on little-endian systems S16LE is also native-endian, so the code did
nothing (as kAudioFormatFlagsNativeEndian is zero), and on big-endian
systems we normally output S16BE instead of S16LE, so the codepath was
not hit.

Sounds right to me as of your description.

@ghost ghost assigned anssih Jul 1, 2012

anssih added a commit that referenced this pull request Jul 10, 2012

Merge pull request #976 from anssih/fix/AE-ca-s16le
[osx] fixed: incorrect mFormatFlags set for S16LE

@anssih anssih merged commit 6380a84 into xbmc:master Jul 10, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment