I'm making a small DAW app in C# and have a big problem and haven't found a solution so far.I need to write a program for virtual keyboard/piano which plays single-shot .wav files, but the issue is playing multiple files at the same when I make keypress events.
For example:
Q is C tone
W is D tone
I want to play them at the same time,so I press Q and W at the same time but only one plays (the first pressed).I used SoundPlayer,
tried to do it using DirectSound, but couldn't make it.
So, I would be pleased if someone has enough time to write a code snipppet for the soundplay function, which I will assign to keypress handler(or example source code of demo project with only 2 or 3 keys ).
SoundPlayer Solution would be preferable (if possible), but in fact, any kind of solution that isn't very complex (in factm doesn't matter ,just needs to work and tell the .dlls used) is welcome (DirectX,DirectSound,NAudio).
Thanks in advance.