Issue #713 - Now automatic Switch files are played
This commit is contained in:
@@ -305,11 +305,14 @@ void pushPrompt(uint16_t prompt, uint8_t id=0);
|
||||
#define AUDIO_RESET() audioQueue.reset()
|
||||
|
||||
#if defined(SDCARD)
|
||||
#define PLAY_PHASE_OFF(phase) do { char filename[AUDIO_FILENAME_MAXLEN+1]; if (isAudioFileReferenced((PHASE_AUDIO_CATEGORY << 24) + (phase << 16) + AUDIO_EVENT_OFF, filename)) audioQueue.playFile(filename); } while (0)
|
||||
#define PLAY_PHASE_ON(phase) do { char filename[AUDIO_FILENAME_MAXLEN+1]; if (isAudioFileReferenced((PHASE_AUDIO_CATEGORY << 24) + (phase << 16) + AUDIO_EVENT_ON, filename)) audioQueue.playFile(filename); } while (0)
|
||||
void playModelEvent(uint8_t category, uint8_t index, uint8_t event=0);
|
||||
#define PLAY_PHASE_OFF(phase) playModelEvent(PHASE_AUDIO_CATEGORY, phase, AUDIO_EVENT_OFF)
|
||||
#define PLAY_PHASE_ON(phase) playModelEvent(PHASE_AUDIO_CATEGORY, phase, AUDIO_EVENT_ON)
|
||||
#define PLAY_SWITCH_MOVED(sw) playModelEvent(SWITCH_AUDIO_CATEGORY, sw)
|
||||
#else
|
||||
#define PLAY_PHASE_OFF(phase)
|
||||
#define PLAY_PHASE_ON(phase)
|
||||
#define PLAY_SWITCH_MOVED(sw)
|
||||
#endif
|
||||
|
||||
void referenceSystemAudioFiles();
|
||||
|
||||
Reference in New Issue
Block a user