Page 1 of 1

Trine 3 new WEM format

Posted: Wed Apr 22, 2015 9:21 am
by Kein
So, Trine 3 WEMs (can be unpacked with official archiver tool) feature different WEMs that cannot be processed with ww2ogg:

Code: Select all

ww2ogg.exe audio1_fbq-0000000187.wem -o 1.ogg --pcb packed_codebooks_aoTuV_603.bin
 Audiokinetic Wwise RIFF/RIFX Vorbis to Ogg Vorbis converter 0.22 by hcs
 Input: audio1_fbq-0000000187.wem
 Parse error: expected 0x42 fmt if vorb missing
http://i.imgur.com/l3EBqou.png

http://rghost.net/6QTtwJF8V


Any idea regarding what could be done here?

UPD: Okay, I can import it as a RAW data with Audacity but there are some issues:
http://i.imgur.com/Vh2pfCH.png

some kind of compression? The Sample rate and bit depth can be detected properly. May be I'm reading WAVE_EXTENSIBLE (FE FF) incorrectly (as opposed to classic wave with linear quantization 01 00)? Not that Audacity has such advanced options for reading raw files.

Re: Trine 3 new WEM format

Posted: Sun Apr 26, 2015 6:12 am
by daemon1
Your file is the simplest plain raw PCM data. No compression. Sounds perfectly. What is the problem?

Re: Trine 3 new WEM format

Posted: Tue Apr 28, 2015 6:37 am
by spider91
You just need to change header a bit to get playable wav pcm file.

http://dropmefiles.com/LVL2g

Re: Trine 3 new WEM format

Posted: Fri Aug 21, 2015 10:35 pm
by spider91
Since i stiil receiving pm's about this format here is a simple script for music files with codec id FFFE (for FFFF use ww2ogg)

Code: Select all

get SIZE asize
math SIZE -= 0x12
putVarChr MEMORY_FILE SIZE 0
log MEMORY_FILE 0 0
append
log MEMORY_FILE 0 0x26
math SIZE -= 0x26
log MEMORY_FILE 0x38 SIZE
append
get SIZE asize
math SIZE -= 0x1A
putVarChr MEMORY_FILE 0x04 SIZE long
putVarChr MEMORY_FILE 0x10 0x12 long
putVarChr MEMORY_FILE 0x14 0x01 short
putVarChr MEMORY_FILE 0x24 0x00 short
get SIZE asize MEMORY_FILE
get NAME basename
string NAME += ".wav"
log NAME 0x00 SIZE MEMORY_FILE