tags:

views:

41

answers:

0
using Microsoft.DirectX.AudioVideoPlayback;
 public static void  playNote (string pass)
        {
        Audio myAudio = new Audio(pass);
        myAudio.Play();
        }

and to play sound I press button

 playNote("PianoDo#.wav");

This is the way I play sounds in my piano. Butif i press a lot of buttons for 30 sec my app starts lagging because of CPU Is there another method which is lighter?Or playing several sounds from stream?