/// <summary> /// Initializes a new XAudio2SoundProvider class /// <param name="xaudio2">The XAudio2 Instance.</param> /// <param name="soundInitializer">The ISoundInitializer.</param> /// </summary> internal XAudio2SoundProvider(CSCore.XAudio2.XAudio2 xaudio2, ISoundInitializer soundInitializer) { SoundInitializer = soundInitializer; _xaudio2 = xaudio2; _xaudio2.CreateMasteringVoice(); }
/// <summary> /// Initializes a new XAudio2SoundProvider class /// <param name="xaudio2">The XAudio2 Instance.</param> /// <param name="soundInitializer">The ISoundInitializer.</param> /// </summary> internal XAudio2SoundProvider(CSCore.XAudio2.XAudio2 xaudio2, ISoundInitializer soundInitializer) { SoundInitializer = soundInitializer; _xaudio2 = xaudio2; _xaudio2.CreateMasteringVoice(); }
public void CanCreateMasteringVoice() { using (var masteringVoice = _xaudio2.CreateMasteringVoice()) { } }