irrklang playing sound from archive?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Malgodur
Posts: 195
Joined: Sun Mar 15, 2009 8:22 pm

irrklang playing sound from archive?

Post by Malgodur »

Well, im using rar files for media, can irrklang load and play sound from such archive? How?
loki1985
Posts: 214
Joined: Thu Mar 31, 2005 2:36 pm

Post 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...
Malgodur
Posts: 195
Joined: Sun Mar 15, 2009 8:22 pm

Post by Malgodur »

Ok, zip. How?
ulao
Posts: 274
Joined: Fri Mar 28, 2008 2:13 am

Post 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.
Malgodur
Posts: 195
Joined: Sun Mar 15, 2009 8:22 pm

Post 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?
ulao
Posts: 274
Joined: Fri Mar 28, 2008 2:13 am

Post 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.
loki1985
Posts: 214
Joined: Thu Mar 31, 2005 2:36 pm

Post 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.
Sylence
Posts: 725
Joined: Sat Mar 03, 2007 9:01 pm
Location: Germany
Contact:

Post 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%
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

There's no need to unzip, irrKlang can use Irrlicht's virtual file system.
ibax
Posts: 193
Joined: Thu Jun 21, 2007 8:56 am
Location: hungary
Contact:

Re: irrklang playing sound from archive?

Post 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
Post Reply