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:
parent
e38a4d320f
commit
ad134173be
3 changed files with 73 additions and 21 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue