Jan 18 at 11:02 PM
Edited Jan 18 at 11:04 PM
Ok so I have one last question, I hope you dont mind:
so now I have a timer which update every 10 miliseconds, after the timer starts i do this :
after I have intersection I add WaveStream data into global list which store all the sounds:
then I set the channelStream.Position = 0;
when I want to play it I use this :
waveOutDevice.Init(SoundMixer.MixerPlay()); //this return SampleToWaveProvider
waveOutDevice.Play();// waveOutDevice is DirectSoundOut.
If I add Thread.Sleep(100); after the whole code I can hear sound,but before this I cant hear nothing, any idea how to do this working
without sleep method ?