n4gix
Resource contributor
- Messages
- 11,674
- Country

have an urgent need to update my sound module to allow for increased flexibility by the users.
I have been using a predefined path to the sim's ..\Sound folder such as the following:
(GaugePlaySound)("sound\\MySound\\SND1.wav","",0)
I already know how to use the "fifth parameter" of the gauge entry to include a relative path, such as the following:
What I don't know however is the correct syntax for concantenating the char variable sound_Path so that it will replace the characters highlighted in red:
(GaugePlaySound)("sound\\MySound\\SND1.wav","",0)
Could it possibly be as simple as this:
I have been using a predefined path to the sim's ..\Sound folder such as the following:
(GaugePlaySound)("sound\\MySound\\SND1.wav","",0)
I already know how to use the "fifth parameter" of the gauge entry to include a relative path, such as the following:
Code:
gauge00=MySound!SoundModule, 0,0,1,1,SimObjects\\Airplanes\\MyAirplane\\panel\\sound
Code:
CHAR sound_Path[MAX_PATH] = "";
int params_read = 0;
case PANEL_SERVICE_POST_INSTALL:
if (pgauge->parameters && params_read == 0)
{
if ( strlen(pgauge->parameters) > 0 )
{
strcpy(sound_Path,(PCHAR)(pgauge->parameters));
params_read = 1;
}
else if ( strlen(pgauge->parameters) == 0 )
{
params_read = 1;
}
What I don't know however is the correct syntax for concantenating the char variable sound_Path so that it will replace the characters highlighted in red:
(GaugePlaySound)("sound\\MySound\\SND1.wav","",0)
Could it possibly be as simple as this:
Code:
(GaugePlaySound)(strcat(soundPath,"\\SND1.wav"),"",0)
Last edited:



