sm64coopdx/docs/lua
jayden 5dabcaa313
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows-opengl (push) Waiting to run
Build coop / build-windows-directx (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
Add audio_stream_get/set_volume_channel (#1205)
Allows modders to play audio streams on channels other than level background music.
4 constants have been added for this purpose:
- `MOD_AUDIO_CHANNEL_MASTER` - sound is only affected by master volume
- `MOD_AUDIO_CHANNEL_MUSIC` - sound is affected by music volume, same as previous behaviour
- `MOD_AUDIO_CHANNEL_SFX` - sound is affected by sfx volume, same as sample behaviour
- `MOD_AUDIO_CHANNEL_ENV` - sound is affected by env volume 
This was done instead of using the existing `SEQ_PLAYER_*` constants to avoid confusion and because there isn't a `NONE`/`MASTER` option.

Additionally, sets the default to `MOD_AUDIO_CHANNEL_MUSIC` as to not break compatibility.

```lua
audio_stream_set_volume_channel(stream, MOD_AUDIO_CHANNEL_SFX) -- wow its just like a sample
audio_stream_get_volume_channel(stream) -- returns MOD_AUDIO_CHANNEL_SFX (its actually 2)
```
2026-05-03 17:59:11 +10:00
..
examples Refactor collision surface systems and add the ability to add/remove/move surfaces (#1143) 2026-05-02 14:58:46 -04:00
guides Fix get_texture_info and add HOOK_ON_DYNOS_PACKS_TOGGLED (#1181) 2026-04-21 21:22:18 -04:00
constants.md Add audio_stream_get/set_volume_channel (#1205) 2026-05-03 17:59:11 +10:00
functions-2.md Multi-return from C and other autogen changes (#1044) 2025-12-19 20:27:44 -05:00
functions-3.md Add independent X and Y scaling to text rendering functions (#1182) 2026-05-01 21:17:44 -04:00
functions-4.md Control the Lighting Engine with le_set_enabled in real time (#1193) 2026-05-01 21:15:09 -04:00
functions-5.md Fix cutscenes, syncing issues, and more (Yoshi!) (#1109) 2026-04-21 23:37:30 -04:00
functions-6.md Add audio_stream_get/set_volume_channel (#1205) 2026-05-03 17:59:11 +10:00
functions-7.md Refactor collision surface systems and add the ability to add/remove/move surfaces (#1143) 2026-05-02 14:58:46 -04:00
functions.md Add audio_stream_get/set_volume_channel (#1205) 2026-05-03 17:59:11 +10:00
globals.md Expose gHudDisplay (#1158) 2026-05-01 22:25:06 -04:00
lua.md Add in C documentation (#1176) 2026-04-21 21:35:01 -04:00
structs.md Add audio_stream_get/set_volume_channel (#1205) 2026-05-03 17:59:11 +10:00