mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-02-17 19:19:16 +01:00
MGS3 VAG1
git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@945 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
parent
3f1f45ba07
commit
72aca13617
@ -48,6 +48,9 @@ VGMSTREAM * init_vgmstream_ps2_vag(STREAMFILE *streamFile) {
|
|||||||
vagID=read_8bit(0x03,streamFile);
|
vagID=read_8bit(0x03,streamFile);
|
||||||
|
|
||||||
switch(vagID) {
|
switch(vagID) {
|
||||||
|
case '1':
|
||||||
|
channel_count=1;
|
||||||
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
channel_count=2;
|
channel_count=2;
|
||||||
break;
|
break;
|
||||||
@ -104,6 +107,15 @@ VGMSTREAM * init_vgmstream_ps2_vag(STREAMFILE *streamFile) {
|
|||||||
vgmstream->channels = channel_count;
|
vgmstream->channels = channel_count;
|
||||||
|
|
||||||
switch(vagID) {
|
switch(vagID) {
|
||||||
|
case '1': // VAG1
|
||||||
|
vgmstream->layout_type=layout_none;
|
||||||
|
vgmstream->sample_rate = read_32bitBE(0x10,streamFile);
|
||||||
|
vgmstream->num_samples = read_32bitBE(0x0C,streamFile)/16*28;
|
||||||
|
interleave = read_32bitLE(0x08,streamFile);
|
||||||
|
if (interleave != 0) goto fail;
|
||||||
|
vgmstream->meta_type=meta_PS2_VAG1;
|
||||||
|
start_offset=0x40;
|
||||||
|
break;
|
||||||
case 'i': // VAGi
|
case 'i': // VAGi
|
||||||
vgmstream->layout_type=layout_interleave;
|
vgmstream->layout_type=layout_interleave;
|
||||||
vgmstream->sample_rate = read_32bitBE(0x10,streamFile);
|
vgmstream->sample_rate = read_32bitBE(0x10,streamFile);
|
||||||
@ -181,7 +193,11 @@ VGMSTREAM * init_vgmstream_ps2_vag(STREAMFILE *streamFile) {
|
|||||||
/* open the file for reading by each channel */
|
/* open the file for reading by each channel */
|
||||||
{
|
{
|
||||||
for (i=0;i<channel_count;i++) {
|
for (i=0;i<channel_count;i++) {
|
||||||
vgmstream->ch[i].streamfile = streamFile->open(streamFile,filename,vgmstream->interleave_block_size);
|
if (vgmstream->interleave_block_size > 0) {
|
||||||
|
vgmstream->ch[i].streamfile = streamFile->open(streamFile,filename,vgmstream->interleave_block_size);
|
||||||
|
} else {
|
||||||
|
vgmstream->ch[i].streamfile = streamFile->open(streamFile,filename,STREAMFILE_DEFAULT_BUFFER_SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
if (!vgmstream->ch[i].streamfile) goto fail;
|
if (!vgmstream->ch[i].streamfile) goto fail;
|
||||||
|
|
||||||
|
@ -2847,7 +2847,10 @@ void describe_vgmstream(VGMSTREAM * vgmstream, char * desc, int length) {
|
|||||||
snprintf(temp,TEMPSIZE,"PS3 SGXD/WAVE header");
|
snprintf(temp,TEMPSIZE,"PS3 SGXD/WAVE header");
|
||||||
break;
|
break;
|
||||||
case meta_PS2_MTAF:
|
case meta_PS2_MTAF:
|
||||||
snprintf(temp,TEMPSIZE,"PS2 MTAF header");
|
snprintf(temp,TEMPSIZE,"Konami MTAF header");
|
||||||
|
break;
|
||||||
|
case meta_PS2_VAG1:
|
||||||
|
snprintf(temp,TEMPSIZE,"Konami VAG Mono header (VAG1)");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
snprintf(temp,TEMPSIZE,"THEY SHOULD HAVE SENT A POET");
|
snprintf(temp,TEMPSIZE,"THEY SHOULD HAVE SENT A POET");
|
||||||
|
@ -522,6 +522,7 @@ typedef enum {
|
|||||||
meta_PS3_KLBS, // L@VE ONCE (PS3)
|
meta_PS3_KLBS, // L@VE ONCE (PS3)
|
||||||
meta_PS3_SGX,
|
meta_PS3_SGX,
|
||||||
meta_PS2_MTAF, // Metal Gear Solid 3 MTAF
|
meta_PS2_MTAF, // Metal Gear Solid 3 MTAF
|
||||||
|
meta_PS2_VAG1, // Metal Gear Solid 3 VAG1
|
||||||
} meta_t;
|
} meta_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user