WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Audout default channel count is wrong #685

@ITotalJustice

Description

@ITotalJustice

Not 100% sure on all this, but from what i've found:

  • channel count is a u16, padded to u32.
  • to upper half of the u32 is ignored.
  • the channel count is actually set to the lower half, with values 0,2,6 being accepted for default (2), 2, 6 (5.1) respectively.
  • the current default channel count in libnx works because the lower half of the u16 is 0, so audout picks 2 channels for us. i can't see the upper half being used anyway so im guessing this was a mistake in the impl where it was assumed that the channel count had to be set in the upper half.

Also, I was wondering if audout api could be changed a little bit in regards to audoutOpenAudioOut. Currently, this will override the g_audoutSrv but not any of the global values such as freq, channel count etc. As it also overrides the g_audoutSrv, it means the previous call to audoutOpenAudioOut which is implicitly done via audoutExit is not closed.

Could we change audoutOpenAudioOut to open the service for a temp value, and if successful and g_audoutSrv is currently active, close g_audoutSrv and replace it with the new service. This will maintain compatibility with all homebrew that use audout whilst now giving the option to change the params.

I can send a pr addressing some / all of the above if you want.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions