Jump to content
Sign in to follow this  
Guest

FSSound problem ... help me, please

Recommended Posts

Guest

Hy all,i've a big problem using FSSound for a looped sound.I've already use in the same gauge the same function in "single play" mode and gauge playing the sound correctly.This is the code for single play, using FALSE in the MFSSoundFilePlay macro :-=-=-=-=-=-=-=-=-BOOL FSAPI doors_disarm(PPIXPOINT relative_point, FLAGS32 mouse_flags){ lookup_var(&panel_circuit);MFSSoundFileRegister(sound_doors_disarm);if(panel_circuit.var_value.n != 0) { MFSSoundFilePlay(sound_doors_disarm, FALSE); } return FALSE;}=-=-=-=-=-=-=-=-=-Now, i've a problem using the same macro with TRUE. In this case i'll expect that when i click on the linked button, the gauge will start a looped sound until i'll press the button already.This is the code ...=-=-=-=-=-=-=-=-=-=....MFSSoundFileVars(sound_air_cond,"SOUNDcabin_callssound_air_cond.wav");........MOUSE_PARENT_BEGIN( 82, 374, 26, 26, 0 ) MOUSE_CHILD_FUNCT( 0, 0, 26, 26, CURSOR_HAND, MOUSE_LEFTSINGLE, air_cond)MOUSE_PARENT_END....BOOL FSAPI air_cond(PPIXPOINT relative_point, FLAGS32 mouse_flags){ lookup_var(&panel_circuit);MFSSoundFileRegister(sound_air_cond);if(panel_circuit.var_value.n != 0) { // start or stop a looping sound buffer if (MFSSoundIsPlaying(sound_air_cond)) MFSSoundStop(sound_air_cond); else // specifying TRUE as the second parameter in the play function (macro) // makes the sound buffer loop forever or until the stop function // (macro) is called MFSSoundFilePlay(sound_air_cond, TRUE); } return FALSE;}-=-=-=-=-=-=-=-=-=With this code, when i press on the gauge button nothing happened !!!The .wav sound is correctly named and is in the correct directory ...Can you help me to find where i wrong ????Bye, Stefano

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...