Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Using SharpDX for sound

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

    Using SharpDX for sound

    Is it possible to use SharpDX for sound instead of PlaySound()?
    The problem I'm having is while having sounds play on several charts and not having "Play consecutively" checked, the sounds are simply not played since another one occured.
    If I instead have "Play consecutively" checked, the sounds are played with several seconds delay due to being queued.

    When sounds are played through only one channel none of these methods are of any use. I don't want the sounds to miss being played and I don't want them delayed either, so I need a way to play sounds that are accurate in timing and not left out.

    #2
    Hello Borgen,

    No sharpdx is the rendering library that is used for specifically the visuals in NinjaTrader, there is no support for any sound related libraries. You can certainly look at external resources to see if there are any sharpdx related libraries that handle sound, if so you can reference those libraries and give it a try.




    JesseNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      Hello Borgen,

      No sharpdx is the rendering library that is used for specifically the visuals in NinjaTrader, there is no support for any sound related libraries. You can certainly look at external resources to see if there are any sharpdx related libraries that handle sound, if so you can reference those libraries and give it a try.



      Yes, SharpDX also has support for audio (XAudio2 for example) besides the graphical rendering so I was thinking that could be used just as you would use it for drawing graphics.
      I didn't see any reference to it in your documentation but if you are using the graphical API why not include sound as well. Especially since the PlaySound method has the limitations mentioned above.

      Comment


        #4
        Hello Borgen,

        This is not something that is used in NinjaTrader, NinjaTrader uses sharpdx only for its visual capabilities. The platform does not include extras that are not used internally. You can use external resources so you are free to add and test any C# reference that is not used with the platform by default.

        JesseNinjaTrader Customer Service

        Comment


          #5
          Borgen, How does playing sound using xaudio2 will help in your situation?

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by ender_wiggum, Today, 09:50 AM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by rajendrasubedi2023, Today, 09:50 AM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by geotrades1, Today, 10:02 AM
          0 responses
          4 views
          0 likes
          Last Post geotrades1  
          Started by bmartz, Today, 09:30 AM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by geddyisodin, Today, 05:20 AM
          3 responses
          25 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Working...
          X