PS2 VAG ADPCM File Format

  adpcm, audio, audio-converter, c++

I’m working on a project to convert form a headerless PS2 VAG file to WAV and from a WAV file to a headerless PS2 VAG file.

Until now the decoder works fine, but we are having issues with the encoder, I’ve created a GitHub repository with the project, is written in C#.
I would really appreciate if someone could tell me what’s wrong in the encoder code, for some reason the file that creates is corrupt…

enter image description here

Here’s the code: https://github.com/jmarti856/ps2_vag/blob/main/PS2_VAG_ENCODER_DECODER/VAGHandler.cs#L49-L184

I’ve been inspiring on this code written in C++, but I’m not an experienced programmer, and I’ve never programmed in that language, so probably I’d skipped some important things:
https://github.com/kakaroto/RCOMage/blob/master/src/vaghandler.c#L256-L347

Thank you very much!!

Source: Windows Questions C++

LEAVE A COMMENT