xaudio2

How can I play multiple sounds at the same time using SharpDX in WinRT?

一曲冷凌霜 提交于 2019-12-01 11:44:48
I am trying to make a musical instrument type of application. The problem I am having is that a new sound will only play if the old one is finished. I would like to be able to play them simultaneously. This is how my code looks like: First, the MyWave class which simply holds an audio buffer and some other info: class MyWave { public AudioBuffer Buffer { get; set; } public uint[] DecodedPacketsInfo { get; set; } public WaveFormat WaveFormat { get; set; } } In the SoundPlayer class: private XAudio2 xaudio; private MasteringVoice mvoice; Dictionary<string, MyWave> sounds; // Constructor public

Windows Phone xaudio2

与世无争的帅哥 提交于 2019-12-01 11:18:46
问题 Hej I am using a library for playing audio in Windows Phone found here. Which works fine. I am then trying to add a new .wav file to this system. And I get a memory error. Searching around on the internet gives me that I have to encode the audio using AdpcmEncode command-line tool. However using this tool cannot convert my .wav files. Can anyone help here, regarding encoding to get the audio working? Furthermore just for my information how big can my audio files be? I think I read some place