Thread: new tool
View Single Post
  #112  
Old 12-02-2018, 07:33
Simorq's Avatar
Simorq Simorq is offline
Registered User
 
Join Date: Mar 2014
Location: Iran
Posts: 642
Thanks: 3,602
Thanked 1,308 Times in 464 Posts
Simorq is on a distinguished road
Thanks to Edison 007

Code:
.Wem Compression
FOR /R "test" %%w IN (*.wem) DO (
    ww2ogg.exe "%%w" -o "%%w.ogg" --pcb "packed_codebooks_aoTuV_603.bin"
    OGGRE_enc_wwise.exe "%%w.ogg" "%%w.ogr"
    OGGRE_dec_wwise.exe "%%w.ogr" "%%w.unp"
    xdelta3.exe -ef -s "%%w.unp" "%%w" "%%w.xd3"
 
    REM DEL "%%w.ogg" "%%w.unp"
    REM DEL "%%w"
)
Code:
ISDONE
function extract_wwise(CurComp: Cardinal; InputPath: String): Boolean;
var
  FindHandle, ColFiles, CurIndex: Integer;
  ExecError: Boolean;
  ogrFile, WavFile, OutFile, xd3file: String;
begin

  FindHandle:=ISFindFiles(CurComp, InputPath+'\*.ogr', ColFiles);
  ExecError:=false;
  while not ExecError and ISPickFilename(FindHandle, InputPath+'\', CurIndex, True) do begin
    ogrFile:=ISGetName( 0);       // FileName.ext.ogr (defaul .ext = .wem)
    WavFile:=ISGetName(1)+'.unp'; // FileName.ext.unp
    OutFile:=ISGetName(1);        // FileName.ext
    xd3file:=ISGetName(1)+'.xd3'; // FileName.ext.xd3
 
    ExecError:=not ISExec(CurComp, 0, 0, ExpandConstant('{tmp}\OGGRE_dec_wwise.exe'), '"'+ogrFile+'" "'+WavFile+'"' , ExpandConstant('{tmp}'), WavFile, False);
    DeleteFile(ogrFile);
    ISxDeltaExtract(CurComp, 0, 0,128, WavFile, xd3file, OutFile, True, True);

  end;
  ISFindFree(FindHandle);
  Result:=not ExecError;

end;



...

    if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, Comps1,Comps2,Comps3, MainForm.Handle, 16, @ProgressCallback) then begin
      repeat
        ...
        if not extract_wwise(0, ExpandConstant('{app}')) then break;
        ...
...

Last edited by Simorq; 12-02-2018 at 07:37.
Reply With Quote
The Following 6 Users Say Thank You to Simorq For This Useful Post:
78372 (14-02-2018), COPyCAT (14-06-2018), elit (28-03-2018), EzzEldin16 (12-04-2018), Gehrman (11-08-2022), KaktoR (12-02-2018)