I want to load a sound for one first time from a .wav-file, store it within a TBank, save this TBank and want to load the sound furtherly from the saved TBank. Therefore I tried:
local tmpBank:TBank = CreateBank(0)
local tmpBankStr:TBankStream = CreateBankStream(tmpBank)
'one first time load the sound from file
Local tmpSnd:TSound =LoadSound("A.wav")
local tmpStr:TStream =ReadStream(tmpSnd)
CopyStream(tmpStr, tmpBankStr)
But ReadStream(tmpSnd) only returns a NULL-object and I also have found no other way to come from TSound to TStream. Is it possible after all to have access to a loaded TSound with TStream ?
|