Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrKlang
Read from MemoryStream

JohnDoe42
Guest
Quote
2012-12-21 20:33:01

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);



erik
Registered User
Quote
2012-12-23 05:59:39

Where does it crash? Is this CSharp? What irrklang version are you using?


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internati?nal" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact