Open bbfe opened 8 years ago
The same error occurs on windows phone 8.1 "This method is only valid on the XAudio 2.7 requestedVersion [Current is: Version28]"
So as it is stated, the property XAudio2.DedviceCount
is no longer available in XAudio 2.8, so you cannot use it.
Thanks, but I am using these commands in c #. What should I change?
Volume = Convert.ToSingle(App.slideEffects / 100); XAudio2 xAudio = new XAudio2(); var masteringVoice = new MasteringVoice(xAudio); NativeFileStream nativeFileStream = new NativeFileStream(strPath, NativeFileMode.Open, NativeFileAccess.Read, NativeFileShare.Read); SoundStream stream = new SoundStream(nativeFileStream); var waveFormat = stream.Format; AudioBuffer buffer = new AudioBuffer { Stream = stream.ToDataStream(), AudioBytes = (int)stream.Length, Flags = BufferFlags.EndOfStream };
var sourceVoice = new SourceVoice(xAudio, waveFormat, true);
sourceVoice.SubmitSourceBuffer(buffer, stream.DecodedPacketsInfo);
sourceVoice.SetVolume(Volume);
sourceVoice.Start();
@maurocos open another issue for this as I'm not sure it is related. Give more details with exceptions...etc.
@xoofx Ok. Thanks for reply (the exception is the same about DeviceCount). Bye