Detecting VAG data (programming) by Nisto at 8:41 PM EST on November 30, 2014
Is there a good algorithm for it?

I've looked at the source code of vgmstream and I've tried to figure out how PSound does it but I haven't really been able to get a good understanding of the format. I've noticed that audio ends when the second byte within a 16-byte boundary is increased by 1 and the pointer is either at the end of the file and/or the next 16 bytes is either 0x00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 or 0x00 07 77 77 77 77 77 77 77 77 77 77 77 77 77 77, but perhaps this is not ALWAYS true? And even then, I don't think this would be a good algorithm in general as there could be just about any type of data where the second byte within a 16-byte boundary is increased and, say, 16 bytes of null bytes follows and/or EOF has been reached.

Can anyone help me out? I am trying to write a Python script to detect VAG data and then do some manipulations with it.
by bxaimc at 6:39 AM EST on December 1, 2014
I would look at vgmstream's source code for MIB and VAG
by snakemeat at 4:20 AM EST on December 9, 2014
My algorithm for VGMToolbox can be found in the VGMToolbox.format.Psf class. See the IsPotentialAdpcm function. I don't think any algorithm is 100% perfect since it's headerless data, but it seems to work pretty well.


Go to Page 0

Search this thread

Show all threads

Reply to this thread:

User Name Tags:

bold: [b]bold[/b]
italics: [i]italics[/i]
emphasis: [em]emphasis[/em]
underline: [u]underline[/u]
small: [small]small[/small]
Link: [url=http://www.google.com]Link[/url]

[img=https://www.hcs64.com/images/mm1.png]
Password
Subject
Message

HCS Forum Index
Halley's Comet Software
forum source