Page 1 of 1
irrklang playing sound from archive?
Posted: Thu Apr 30, 2009 11:47 am
by Malgodur
Well, im using rar files for media, can irrklang load and play sound from such archive? How?
Posted: Thu Apr 30, 2009 4:24 pm
by loki1985
i guess you mean ZIP file. haven't seen RAR archive support anywhere yet. would be nonsense anyway, since it hinders random access...
Posted: Thu Apr 30, 2009 4:30 pm
by Malgodur
Ok, zip. How?
Posted: Thu Apr 30, 2009 4:34 pm
by ulao
Like loki1985 said.
would be nonsense anyway, since it hinders random access...
You would have to use Zlib and extract it to a temp dir, or your may run in to a lot of problems.
If you need it compressed use mp3. Why do you need it in a zip? Keep the audio out side the zip.
Posted: Thu Apr 30, 2009 5:10 pm
by Malgodur
Well... games like CALLOF DUTY store sound files COMPRESSED in pk3? if i remember, but pk3 is a zip extension, so i ask is it possible in irrlicht?
Call of duty every time when launched extract sound files to temp dir?
Posted: Thu Apr 30, 2009 6:53 pm
by ulao
like I said..
You would have to use Zlib and extract it to a temp dir, or your may run in to a lot of problems.
in other words. You have to extract them to a temp dir first, like Call of duty does, or ( the alternative ) will result in problems.
Does Irrlicht have built in zip exporting support?, well I'm not sure but it does open a zip, so its possible.
So I guess your question now is. "Can I extract a zip file to a temp directory?" May need to start a new topic as this heading is now misleading
However I dont think its a very on common question. Zlib could handle this. Irrlicht does not limit you to its SDK you can use other libs you know.
Posted: Thu Apr 30, 2009 6:56 pm
by loki1985
well, temp directory might not be needed, but extracting to RAM is (or, to be superkinky, streaming extraction might work too in some cases like BGM).
but as for irrklang, you have to find out how that works. i just seem to remember it was somehow possible to pass file handles to irrklang, virtual ones too.
Posted: Thu Apr 30, 2009 7:29 pm
by Sylence
Malgodur wrote:Well... games like CALLOF DUTY store sound files COMPRESSED in pk3?
Did you ever try to zip a mp3 file?
I just did
You can probalby save a few kilobytes by doing so.
To give you an example:
5226299 bytes before compression
5213434 bytes after compression
this makes a difference of
12865 bytes or 12.5 kilobytes or 0,2%
Posted: Thu Apr 30, 2009 9:49 pm
by hybrid
There's no need to unzip, irrKlang can use Irrlicht's virtual file system.
Re: irrklang playing sound from archive?
Posted: Sat Mar 30, 2019 12:04 pm
by ibax
Hi there... I'm just trying to do the same thing, but without any visible, or either audible result.
I'm discussing a possible workaround with CuteAlien in an another forum topic:
http://irrlicht.sourceforge.net/forum/v ... =1&t=52464