bah.irrKlang with korilios or gman zipstream mod?
BlitzMax Forums/Brucey's Modules/bah.irrKlang with korilios or gman zipstream mod?
| ||
I like the idea of loading my sounds from a zip file but irrKlang does not seem to like this at all - the sounds do not load. Has anyone done this with success? |
| ||
Push, because I need to use irrKlang with korilios zipstream module. Any ideas? |
| ||
Extract the file from the zipstream to ram and use addSoundSourceFromMemory() ?? http://www.ambiera.com/irrklang/docu/index.html#soundSources Using addSoundSourceFromMemory(), it is also possible to play sounds back directly from memory, without files. Just a hunch. |
| ||
I know about addSoundSourceFromMemory but I don't get it to work. I've tried it yet. |
| ||
I don't have the libs to test with but that should have been the solution. Alternatively you can override the file handling: http://www.ambiera.com/irrklang/docu/index.html#fileOverriding What does your "addSoundSourceFromMemory" code look like? |
| ||
Looks like I found the solution. You have to change irrklangaudio.bmx like this:'Go though irrklangaudio.bmx and find the TISoundSourceSound type: Type TISoundSourceSound Extends TSound Field _sound:TISoundSource Field is3D:Int Field isLooped:Int Field _bank: TBank '<---------- Add this field 'Some lines down, replace the hole "If proto = "incbin" block with this: Select proto Case "incbin" Local buf:Byte Ptr = IncbinPtr( path ) If Not buf Then Return Null End If ' Note: we leave on the file-extension for the name as win32 seems to have a problem ' playing in-memory sounds if it is not provided. this._sound = _driver._engine.AddSoundSourceFromMemory(buf, IncbinLen(path), StripDir(s), False) Case "zip" this._bank = LoadBank(url) this._sound = _driver._engine.AddSoundSourceFromMemory(BankBuf(this._bank), BankSize(this._bank), StripDir(s), False) End Select Last edited 2012 Last edited 2012 Last edited 2012 |
| ||
The code above isn't the solution. It workes but causes problems when streaming the same sounds at same time. Very weird. I don't have any more ideas how to get it to work. Last edited 2012 |