Announcement

Collapse
No announcement yet.

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.




    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.

        Comment


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

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          624 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          359 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
          562 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          567 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X