Hi everyone,
I have a problem when I try to read a song from a MemoryStream. It works in Debug mode (even if I get the error : "No streaming was specified, but forcing to play sound streamed (See ISoundSource::setForcedStreamingThreshold): file.mp3") but the program crash in Release mode.
I don't know what to try :( Thank you so much for your help!
FileStream inStream = File.OpenRead(chemin); MemoryStream storeStream = new MemoryStream(); storeStream.SetLength(inStream.Length); inStream.Read(storeStream.GetBuffer(), 0, (int)inStream.Length); eng.RemoveAllSoundSources(); ISoundSource source = eng.AddSoundSourceFromIOStream(storeStream, "file.mp3");
eng.StopAllSounds(); path = chemin;
S = eng.Play2D("file.mp3", false, false, StreamMode.NoStreaming, true); length = Convert.ToInt32(S.PlayLength / 1000);
|