Swadge 2024
2.0.0
APIs to develop games for the Magfest Swadge
Loading...
Searching...
No Matches
soundFuncs.h
Go to the documentation of this file.
1
12
#pragma once
13
14
#include "
midiPlayer.h
"
15
16
#if defined(CONFIG_SOUND_OUTPUT_SPEAKER)
17
27
#define soundPlaySfx(song, channel) globalMidiPlayerPlaySong(song, MIDI_SFX)
28
39
#define soundPlayBgm(song, channel) globalMidiPlayerPlaySong(song, MIDI_BGM)
40
50
#define soundPlaySfxCb(song, channel, cb) globalMidiPlayerPlaySongCb(song, MIDI_SFX, cb)
51
61
#define soundPlayBgmCb(song, channel, cb) globalMidiPlayerPlaySongCb(song, MIDI_BGM, cb)
62
70
#define soundStop(reset) globalMidiPlayerStop(reset)
71
77
#define soundPause() globalMidiPlayerPauseAll()
78
84
#define soundResume() globalMidiPlayerResumeAll()
85
95
#define soundSave() globalMidiSave()
96
104
#define soundRestore(data) globalMidiRestore(data)
105
116
#define soundPlayNote(freq, channel, vol) midiNoteOn(globalMidiPlayerGet(channel), 0, freq, vol)
117
125
#define soundStopNote(channel) midiNoteOff(globalMidiPlayerGet(channel), 0, freq, vol)
126
131
#define soundGetPlayerSfx() globalMidiPlayerGet(0)
132
137
#define soundGetPlayerBgm() globalMidiPlayerGet(1)
138
139
#elif defined(CONFIG_SOUND_OUTPUT_BUZZER)
140
#error "Buzzer is no longer supported, get with the times!"
141
#endif
midiPlayer.h
main
utils
soundFuncs.h
Generated by
1.10.0