Path: blob/master/RSDKv5/RSDK/Audio/Legacy/AudioLegacy.hpp
1182 views
1namespace Legacy2{3#define LEGACY_TRACK_COUNT (0x10)45struct TrackInfo {6char fileName[0x40];7bool32 trackLoop;8uint32 loopPoint;9};1011extern int32 globalSFXCount;12extern int32 stageSFXCount;1314extern int32 musicVolume;15extern int32 sfxVolume;16extern int32 bgmVolume;17extern int32 musicCurrentTrack;18extern int32 musicChannel;1920extern TrackInfo musicTracks[LEGACY_TRACK_COUNT];2122void SetMusicTrack(const char *filePath, uint8 trackID, bool32 loop, uint32 loopPoint);23int32 PlayMusic(int32 trackID);24inline void StopMusic() { StopChannel(musicChannel); }25void SetMusicVolume(int32 volume);2627// helper func to ensure compatibility with how v3/v4 expects it (no plays var and slot is set manually)28void LoadSfx(char *filename, uint8 slot, uint8 scope);29inline int32 PlaySfx(int32 sfxID, bool32 loop) { return RSDK::PlaySfx(sfxID, loop, 0xFF); }30inline void StopSfx(int32 sfxID) { RSDK::StopSfx(sfxID); }3132namespace v333{34extern char globalSfxNames[SFX_COUNT][0x40];35extern char stageSfxNames[SFX_COUNT][0x40];3637void SetSfxName(const char *sfxName, int32 sfxID, bool32 global);38void SetSfxAttributes(int32 channelID, int32 loop, int8 pan);39} // namespace v34041namespace v442{43extern float musicRatio;44extern char sfxNames[SFX_COUNT][0x40];4546void SwapMusicTrack(const char *filePath, uint8 trackID, uint32 loopPoint, uint32 ratio);47void SetSfxAttributes(int32 sfxID, int32 loop, int8 pan);4849void SetSfxName(const char *sfxName, int32 sfxID);50} // namespace v45152} // namespace Legacy5354