Skip to content

Add AXSetMultiVoiceDeviceMix and update AXSetVoiceDeviceMix - #2050

Open
capitalistspz wants to merge 4 commits into
cemu-project:mainfrom
capitalistspz:little-mix
Open

Add AXSetMultiVoiceDeviceMix and update AXSetVoiceDeviceMix#2050
capitalistspz wants to merge 4 commits into
cemu-project:mainfrom
capitalistspz:little-mix

Conversation

@capitalistspz

Copy link
Copy Markdown
Contributor

return result;
}

sint32 AXSetMultiVoiceDeviceMix(AXVPBMULTI* mv, int32_t deviceType, int32_t deviceIndex, uint32_t busIndex, uint16_t vol, int16_t delta)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basic types without _t

By happenstance this also fixes the `deviceMix` display in the Audio Debugger
for (auto voiceChannel = 0; voiceChannel < mv->channelCount; ++voiceChannel)
{
std::array<std::array<AXCHMIX2, AX_BUS_COUNT>, AX_TV_CHANNEL_COUNT> mix{};
mix[voiceChannel][busIndex].vol = vol;

@Exzap Exzap Sep 5, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

voiceChannel (mv->channelCount) and busIndex should be bounds checked at the beginning of this function to prevent out of bounds access here. Maybe print a log line with LogType::APIErrors so that homebrew devs that use this incorrectly can see it in the log

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants