-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-Channel Audio playback #96
base: stable
Are you sure you want to change the base?
Conversation
…tive for Windows (WASAPI) at the moment.
…mat for both multi-channel audio and PS5 haptics audio.
…Ds as a signal for choosing the default audio device.
…pecification of the audio format the device should initialize for playback.
…oid too. However, actual surround sound audio won't be rendered on those platforms.
how did this compile before, i wonder
fix android build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand on Windows and macOS are the current targets, but I've made not of what's missing and provided documentation links for Android and Linux to receive support for this too. Android may be easy, though Linux looks a little more involved.
The only required change is the issue with the description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't see any obvious problems
…IDs and configuration enums in matoya.
src/windows/audio.c
Outdated
|
||
} else { | ||
pwfx.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE; | ||
pwfx.Format.cbSize = 22; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know the documentation states "should be bigger than 22", I think this should be set to:
pwfx.Format.cbSize = 22; | |
pwfx.Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, 22 is correct but it is misleading. The more accurate way to write it is:
pwfx.Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX);
Why? Because docs say that the value is the total bytes of data appended to the WAVEFORMATEX
struct. Not the total bytes of the whole struct.
I have made this change now, thanks.
This PR adds multi-channel audio support to MTY_Audio for Windows and macOS. The
MTY_AudioCreate
function has been enhanced with the ability to specify multi-channel audio parameters. All platforms have been changed to respect these parameters however proper surround sound audio will only work on Windows and macOS at the moment.