REDIVIVUS

Proposals / #1405

Correct the Mac sample volume setter's by-value integer input

checked · by eejitgames · submitted 2026-11-07

Mac SOUNDSMP_SetVolume 002e908e declares nVolume as int*32, but native code reads the DWORD stack value itself, stores it as the sample volume and uses signed scalar multiplication/division and conversion. All eight direct callers pass constants, saved volumes, a getter result or integer calculations; none passes an address to dereference. Retype only nVolume at Stack[0x8]:4 to int, matching the paired Windows by-value input. Preserve cdecl, void result, the nominal sample receiver and chosen names. The independent Mac 96-versus-88-byte struct layout still needs maintainer compaction documented in #1402; this input correction does not repair it. Explicit caller locals may also need follow-up after application. Native applicability checks are not generated-source, compiler or runtime validation.

Changes 1, applied together

  1. Retype variable mac 0x002e908e Stack[0x8]

    typeint *32→int