Announcement

Collapse
No announcement yet.

Sound Alert Problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sound Alert Problem

    Hello there,
    I'va a small problem with my audio alert.

    I added this code:

    fpArray[x] = new FunctionParameter("AlertOn", FunctionParameter.STRING);
    with(fpArray[x++]){
    setName("Alert");
    addOption("OFF");
    addOption("Warning");
    addOption("ding");
    setDefault("Warning");

    Then I added this code:

    if(AlertOn="OFF");
    Alert.playSound(AlertOn+".wav");


    The code seems correct but I get an other sound (I think a default sound from windows system) and not what I listed in the FunctionParameter.

    Any suggest?

  • #2
    Re: Sound Alert Problem

    Hi Aletrader,

    It doesn't look like you have things set up correctly. Take a look at this link.

    If you still have problems, you should post a working efs.

    hope this helps,

    Steve

    Originally posted by Aletrader
    Hello there,
    I'va a small problem with my audio alert.

    I added this code:

    fpArray[x] = new FunctionParameter("AlertOn", FunctionParameter.STRING);
    with(fpArray[x++]){
    setName("Alert");
    addOption("OFF");
    addOption("Warning");
    addOption("ding");
    setDefault("Warning");

    Then I added this code:

    if(AlertOn="OFF");
    Alert.playSound(AlertOn+".wav");


    The code seems correct but I get an other sound (I think a default sound from windows system) and not what I listed in the FunctionParameter.

    Any suggest?

    Comment


    • #3
      Hi Steve, thank you for prompt reply. The link that you posted was my first solution but then I decide to add some options to control these once from the chart properties...

      Comment


      • #4
        Hi Aletrader,

        You're welcome, the conditional you listed is a bit off, try this...

        if(AlertOn=="OFF"){
        // do nothing
        }
        else{
        Alert.playSound(AlertOn+".wav");
        }


        Steve


        Originally posted by Aletrader
        Hi Steve, thank you for prompt reply. The link that you posted was my first solution but then I decide to add some options to control these once from the chart properties...

        Comment


        • #5
          Thank you Steve, I tried your code but I got the same sound. The sound that I get is not here: C:\Program Files (x86)\eSignal\Sounds

          The sound that I get is in that folder:
          C:\Windows\Media\ding.wav

          Any ideas?

          Comment


          • #6
            Hi Aletrader,

            You are welcome. Is your Sound Files Root folder setup correctly? Check out tutorial 1 - Intro for the Sound Files Root folder location.

            If this isn't it, you should post the efs you are having problems with. See the posting guidelines for some guidance.

            I suggest using the "Attach File:" feature in your reply. Be careful if you attach your file, then preview your post (before posting). Previewing the post will cause the file you attached to be removed. I recommend attaching your file just prior to posting to prevent this.


            Originally posted by Aletrader
            Thank you Steve, I tried your code but I get the same sound. The sound that I get is not here: C:\Program Files (x86)\eSignal\Sounds

            The sound that I get is in that folder:
            C:\Windows\Media\ding.wav

            Any ideas?

            Comment


            • #7
              Hi Steve,
              I tried everything without success.
              The sound file root is correct.
              In attachment part of the code

              Thank you guys
              Attached Files

              Comment

              Working...
              X