1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 00:05:17 +03:00

Issue #713 - Now automatic Switch files are played

This commit is contained in:
Bertrand Songis 2014-02-19 11:30:54 +01:00
parent e38a4d320f
commit ad134173be
3 changed files with 73 additions and 21 deletions

View file

@ -296,8 +296,18 @@ bool isAudioFileReferenced(uint32_t i, char * filename)
return false;
}
void playModelEvent(uint8_t category, uint8_t index, uint8_t event)
{
char filename[AUDIO_FILENAME_MAXLEN+1];
if (isAudioFileReferenced((category << 24) + (index << 16) + event, filename)) {
audioQueue.playFile(filename);
}
}
#else
#define isAudioFileReferenced(i, f) false
#endif
// TODO should be generated and in flash rather than in ram