feat: add PlayOnTrigger for music-synced audio playback

- Add PlayOnTrigger method to AudioSystem for scheduling audio playback on music sync events (beat/bar/grid)
- Rename ButtonInvoker to SetStateBind for better clarity
- Update PlaySoundBind to support both direct playback and trigger-based playback with callback flags
- Add CallbackFlags enum (MusicSyncBeat, MusicSyncBar, MusicSyncGrid)
- Update Metronome demo to use new callback flag naming convention
- Add test audio file sfx_notice_test.wav
- Update scene UI to demonstrate PlayOnTrigger functionality
This commit is contained in:
2026-04-16 14:39:58 +08:00
parent 0fb0c51f65
commit 813f4254c9
11 changed files with 99 additions and 127 deletions
@@ -86,9 +86,10 @@ namespace OCES.Audio
public partial class MusicPath : IPathEntry { }
public partial class AmbiencePath : IPathEntry { }
public class SwitchEntry
public enum CallbackFlags
{
public uint SwitchValue;
public uint AudioObjectId;
MusicSyncBeat = 1,
MusicSyncBar = 2,
MusicSyncGrid = 3,
}
}