mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 01:35:21 +03:00
getSystemAudioPath renamed to strAppendSystemAudioPath
This commit is contained in:
parent
dd1ca93b70
commit
a95f9b7dde
1 changed files with 4 additions and 4 deletions
|
@ -203,7 +203,7 @@ char * getAudioPath(char * path)
|
||||||
return path + sizeof(SOUNDS_PATH);
|
return path + sizeof(SOUNDS_PATH);
|
||||||
}
|
}
|
||||||
|
|
||||||
char * getSystemAudioPath(char * path)
|
char * strAppendSystemAudioPath(char * path)
|
||||||
{
|
{
|
||||||
char * str = getAudioPath(path);
|
char * str = getAudioPath(path);
|
||||||
strcpy(str, SYSTEM_SUBDIR "/");
|
strcpy(str, SYSTEM_SUBDIR "/");
|
||||||
|
@ -212,7 +212,7 @@ char * getSystemAudioPath(char * path)
|
||||||
|
|
||||||
void getSystemAudioFile(char * filename, int index)
|
void getSystemAudioFile(char * filename, int index)
|
||||||
{
|
{
|
||||||
char * str = getSystemAudioPath(filename);
|
char * str = strAppendSystemAudioPath(filename);
|
||||||
strcpy(str, audioFilenames[index]);
|
strcpy(str, audioFilenames[index]);
|
||||||
strcat(str, SOUNDS_EXT);
|
strcat(str, SOUNDS_EXT);
|
||||||
}
|
}
|
||||||
|
@ -232,7 +232,7 @@ void referenceSystemAudioFiles()
|
||||||
assert(sizeof(audioFilenames)==AU_SPECIAL_SOUND_FIRST*sizeof(char *));
|
assert(sizeof(audioFilenames)==AU_SPECIAL_SOUND_FIRST*sizeof(char *));
|
||||||
assert(sizeof(sdAvailableSystemAudioFiles)*8 >= AU_SPECIAL_SOUND_FIRST);
|
assert(sizeof(sdAvailableSystemAudioFiles)*8 >= AU_SPECIAL_SOUND_FIRST);
|
||||||
|
|
||||||
char * filename = getSystemAudioPath(path);
|
char * filename = strAppendSystemAudioPath(path);
|
||||||
*(filename-1) = '\0';
|
*(filename-1) = '\0';
|
||||||
|
|
||||||
FRESULT res = f_opendir(&dir, path); /* Open the directory */
|
FRESULT res = f_opendir(&dir, path); /* Open the directory */
|
||||||
|
@ -1239,7 +1239,7 @@ void pushPrompt(uint16_t prompt, uint8_t id)
|
||||||
{
|
{
|
||||||
#if defined(SDCARD)
|
#if defined(SDCARD)
|
||||||
char filename[AUDIO_FILENAME_MAXLEN+1];
|
char filename[AUDIO_FILENAME_MAXLEN+1];
|
||||||
char * str = getSystemAudioPath(filename);
|
char * str = strAppendSystemAudioPath(filename);
|
||||||
strcpy(str, "0000" SOUNDS_EXT);
|
strcpy(str, "0000" SOUNDS_EXT);
|
||||||
for (int8_t i=3; i>=0; i--) {
|
for (int8_t i=3; i>=0; i--) {
|
||||||
str[i] = '0' + (prompt%10);
|
str[i] = '0' + (prompt%10);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue