See site in english Voir le site en francais
Website skin:
home  download  forum  link  contact

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Author Topic: sound coding issue  (Read 1764 times)

0 Members and 1 Guest are viewing this topic.

Offline gattico

  • Sr. Member
  • ****
  • Posts: 337
  • Country: United States us
  • Karma: 15
30 September 2009, 14:31:59
Hi,

Not sure why this is not working.  But if you press a key then Ignition_check=YES_start otherwise Ignition_check = No_start.  

that works.  And if you press the k you get a strt sound.  Then the engine sound comes on.  But If you press the ignition key
again.  I want no sound.  I still hear the engine.

// engine sound
 double pit = (vsAirSpeed * pit2) + 11025;
 double sp = (190 +((vsAirSpeed)*15));
 if (sp>=225)sp=225;

// Only turn on the engine sound if it is not already running AND if velocity is >= 10 meters-per-second;
// otherwise, only turn OFF the engine sound if it is running AND if velocity is < 10 meters-per-second.
if (!IsPlaying3(JohnSoundID, ENG) && (vsAirSpeed >= 0)&& (IGNITION_check == YES_START))
{
    // turn on the engine sound
    PlayVesselWave3(JohnSoundID,ENG,LOOP,190);
}
else if (IsPlaying3(JohnSoundID, ENG) && (vsAirSpeed < 0))
{
    // turn off the engine sound
    StopVesselWave3(JohnSoundID, ENG);
}


Offline Virbolix

  • Jr. Member
  • **
  • Posts: 85
  • Karma: 0
Reply #1 - 04 October 2009, 20:06:16
Hmmmm It's the first time i see a problem with the sound ... and i can't help you, Dan, come, we need your help :D



Message modifié ( 04-10-2009 20:07 )

« Last Edit: 04 October 2009, 21:46:54 by Virbolix »
:prof:

Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #2 - 04 October 2009, 21:46:54
Run in debug, put a breakpoint on first lign and see if all your variable are really working as you think.

Hope this help ?

Dan

« Last Edit: 04 October 2009, 21:46:54 by DanSteph »