Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sound api only supports pcm wave files

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

    Sound api only supports pcm wave files

    Code:
    playstring = "SOUND8.wav";
    PlaySound(@"C:\Program Files\Final\sounds\"+playstring );
    I have a series of .wav files that the code randomly selects. Used to work fine in 6.5 but gives occasional errors in 7.

    #2
    Unfortunately I can't comment, since we are no audio experts. NT7 comes with native .NET implementation for PlaySound(), whereas NT6.5 had been using a different non-.NET approach. This might make a difference.

    Comment


      #3
      anyone else

      well they are just bog basic .wav files - does anyone else have this issue?

      Comment


        #4
        fyi

        After some investigation and trial and error it appears that not all .wav files are the same.
        You have to look in the properties section and check that the audio format is PCM and not for instance mpeg Layer-3 which will no longer work.

        Comment


          #5
          Originally posted by Mindset View Post
          After some investigation and trial and error it appears that not all .wav files are the same.
          You have to look in the properties section and check that the audio format is PCM and not for instance mpeg Layer-3 which will no longer work.
          Thanks for this tidbit.
          RayNinjaTrader Customer Service

          Comment


            #6
            Chosing Sound Files

            Is there a way to use a dialog box vs. a hard coded enum from a drop down list?

            Comment


              #7
              Hello ZTRade101,

              Unfortunately, I am not sure if I follow. Where exactly in the software are you choosing sound files; what drop down list do you refer?

              Comment


                #8
                Originally posted by NinjaTrader_Jason View Post
                Hello ZTRade101,

                Unfortunately, I am not sure if I follow. Where exactly in the software are you choosing sound files; what drop down list do you refer?
                In an indicator that I am working on now, the values of an enumeration correspond to specific .wav files that are located in the Ninjatrader Sounds folder. The user is limited to choosing from the values of the enumeration. This has two disadvantages:
                • The number of sound files that the user can choose from is limited.
                • If I code the indicator to look for files with names that exist in the Sounds folder of MY computer (sounds that I have ADDED to the folder on my own), but those sounds do not exist in the Sounds folder of the USER'S computer, there will be an error if the user tries to choose those sounds.

                The ideal solution would be if, upon clicking on one of the lines in the indicator properties, a Windows "Open File" dialog box would open, allowing the user to pick a .wav file anywhere on the user's computer. I have not seen a file picking option like this in any other indicator. Can it be done?

                Comment


                  #9
                  As far as I know this is not supported. I will forward your suggestion to our development team and ask them if they can add this to the list of future considerations for the software.

                  Thank you for your feedback.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  612 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  355 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  105 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  561 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  564 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X