Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hello, I am writing a programm in which I can make recordings with irrklang, save them on the disk and then later join those wav recordings together into a "giant" wav. I have come across a strange problem that might have something to do with the wav length / file size and the function getsampledata() from SAudioStreamFormat. After joining together the first couple of wav files [my output file has a length of 27 seconds by that point] the function getsampledata() returns a zero even due, getSampleDataSize() and all the other functions of this method return valid data. Please have a look at the picture it will probably become more clear what I am talking about. Also note that I use ESM_NO_STREAMING to open the file. Can anyone guess why this function returns suddenly zero even due it works perfectly fine for the first couple of times? |
||||
|
by the way adding ISoundSource* firstwav = engine->addSoundSourceFromFile(bigwav.c_str(),ESM_NO_STREAMING,true); doesn't change anything. why can one only set the streaming threashould after loading the file ?? ... doesn't that defeat the whole point ? |
||||
|
Ok I don't know what else to try. I now 'ported' my code, to a console application - just added it into the Hello World example. again doing the usual:
and even due I specify no streaming and set the threshold to -1, the console output is: No streaming was specified, but forcing to play sound streamed (See ISoundSource ::setForcedStreamingThreshold): ../../media/bu.wav Can read out the first file where as bu is a 2.28MB wav file. How do I solve this? |
||||
|
*WUHU* by doing exactly the opposite of this guy -> http://www.ambiera.com/forum.php?t=1676 i.e. setting the last parameter of addsoundsourcefromfile to FALSE ISoundSource* firstwav = engine->addSoundSourceFromFile(bigwav.c_str(),ESM_NO_STREAMING,false); firstwav->setForcedStreamingThreshold(0); I solved it. This parameters are really confusing, maybe some should add this to the API documentation that they apparently cancel eachother out + I want the 6 hours of my life back ^^ |
||||
|
Ah, nice :) |
|