mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-02-25 14:34:40 +01:00
pdt fixed (mario party gamecube)
git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@472 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
parent
e6c10765ae
commit
863e8f3b58
@ -1,7 +1,7 @@
|
|||||||
#include "meta.h"
|
#include "meta.h"
|
||||||
#include "../util.h"
|
#include "../util.h"
|
||||||
|
|
||||||
/* PDT (Mario Party 6, possibly other MP games) */
|
/* PDT (Mario Party) */
|
||||||
VGMSTREAM * init_vgmstream_ngc_pdt(STREAMFILE *streamFile) {
|
VGMSTREAM * init_vgmstream_ngc_pdt(STREAMFILE *streamFile) {
|
||||||
VGMSTREAM * vgmstream = NULL;
|
VGMSTREAM * vgmstream = NULL;
|
||||||
char filename[260];
|
char filename[260];
|
||||||
@ -20,8 +20,8 @@ VGMSTREAM * init_vgmstream_ngc_pdt(STREAMFILE *streamFile) {
|
|||||||
goto fail;
|
goto fail;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
loop_flag = 1;
|
loop_flag = (read_32bitBE(0x0C,streamFile)!=2); /* not sure, but it seems unlooped = 2 */
|
||||||
channel_count = read_32bitBE(0x0C,streamFile);
|
channel_count = 2; /* read_32bitBE(0x0C,streamFile); */
|
||||||
|
|
||||||
/* build the VGMSTREAM */
|
/* build the VGMSTREAM */
|
||||||
vgmstream = allocate_vgmstream(channel_count,loop_flag);
|
vgmstream = allocate_vgmstream(channel_count,loop_flag);
|
||||||
@ -32,14 +32,19 @@ VGMSTREAM * init_vgmstream_ngc_pdt(STREAMFILE *streamFile) {
|
|||||||
vgmstream->channels = channel_count;
|
vgmstream->channels = channel_count;
|
||||||
vgmstream->sample_rate = read_32bitBE(0x04,streamFile);
|
vgmstream->sample_rate = read_32bitBE(0x04,streamFile);
|
||||||
vgmstream->coding_type = coding_NGC_DSP;
|
vgmstream->coding_type = coding_NGC_DSP;
|
||||||
vgmstream->num_samples = read_32bitBE(0x08,streamFile);
|
vgmstream->num_samples = read_32bitBE(0x08,streamFile)*14/8/channel_count;
|
||||||
if (loop_flag) {
|
if (loop_flag) {
|
||||||
vgmstream->loop_start_sample = 0;
|
vgmstream->loop_start_sample = read_32bitBE(0x0C,streamFile)*14/8/channel_count;
|
||||||
vgmstream->loop_end_sample = read_32bitBE(0x08,streamFile);
|
vgmstream->loop_end_sample = read_32bitBE(0x08,streamFile)*14/8/channel_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
vgmstream->layout_type = layout_interleave;
|
if (vgmstream->channels == 1) {
|
||||||
vgmstream->interleave_block_size = 0x10;
|
vgmstream->layout_type = layout_none;
|
||||||
|
} else {
|
||||||
|
vgmstream->layout_type = layout_interleave;
|
||||||
|
vgmstream->interleave_block_size = (get_streamfile_size(streamFile)-start_offset)/2;
|
||||||
|
}
|
||||||
|
|
||||||
vgmstream->meta_type = meta_NGC_PDT;
|
vgmstream->meta_type = meta_NGC_PDT;
|
||||||
|
|
||||||
|
|
||||||
@ -48,7 +53,7 @@ VGMSTREAM * init_vgmstream_ngc_pdt(STREAMFILE *streamFile) {
|
|||||||
for (i=0;i<16;i++) {
|
for (i=0;i<16;i++) {
|
||||||
vgmstream->ch[0].adpcm_coef[i] = read_16bitBE(0x20+i*2,streamFile);
|
vgmstream->ch[0].adpcm_coef[i] = read_16bitBE(0x20+i*2,streamFile);
|
||||||
}
|
}
|
||||||
if (vgmstream->channels) {
|
if (vgmstream->channels == 2) {
|
||||||
for (i=0;i<16;i++) {
|
for (i=0;i<16;i++) {
|
||||||
vgmstream->ch[1].adpcm_coef[i] = read_16bitBE(0x40+i*2,streamFile);
|
vgmstream->ch[1].adpcm_coef[i] = read_16bitBE(0x40+i*2,streamFile);
|
||||||
}
|
}
|
||||||
|
@ -241,7 +241,7 @@ typedef enum {
|
|||||||
meta_IDSP, /* Chronicles of Narnia */
|
meta_IDSP, /* Chronicles of Narnia */
|
||||||
|
|
||||||
meta_IDSP2, /* Chronicles of Narnia */
|
meta_IDSP2, /* Chronicles of Narnia */
|
||||||
meta_WAA_WAC_WAD_WAM, /* Beyond Good & Evil */
|
meta_WAA_WAC_WAD_WAM, /* Beyond Good & Evil */
|
||||||
|
|
||||||
meta_NGC_YMF, /* WWE WrestleMania X8 */
|
meta_NGC_YMF, /* WWE WrestleMania X8 */
|
||||||
meta_SADL, /* .sad */
|
meta_SADL, /* .sad */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user