2017-12-11 02:30:00 +01:00
|
|
|
#include "meta.h"
|
|
|
|
#include "../coding/coding.h"
|
|
|
|
|
2021-09-27 00:10:28 +02:00
|
|
|
/* MOGG - Harmonix Music Systems's Ogg (unencrypted type) [Guitar Hero II (X360)] */
|
|
|
|
VGMSTREAM* init_vgmstream_mogg(STREAMFILE* sf) {
|
2018-03-23 16:34:48 +01:00
|
|
|
off_t start_offset;
|
2017-12-11 02:30:00 +01:00
|
|
|
|
2021-09-27 00:10:28 +02:00
|
|
|
|
2018-03-23 16:34:48 +01:00
|
|
|
/* checks */
|
2021-09-27 00:10:28 +02:00
|
|
|
if (read_u32le(0x00, sf) != 0x0A) /* type? */
|
|
|
|
goto fail;
|
|
|
|
|
2021-07-29 23:20:43 +02:00
|
|
|
if (!check_extensions(sf, "mogg"))
|
2018-03-23 16:34:48 +01:00
|
|
|
goto fail;
|
2017-12-11 02:30:00 +01:00
|
|
|
|
2018-03-23 16:34:48 +01:00
|
|
|
{
|
|
|
|
ogg_vorbis_meta_info_t ovmi = {0};
|
2017-12-11 02:30:00 +01:00
|
|
|
|
2018-03-23 16:34:48 +01:00
|
|
|
ovmi.meta_type = meta_MOGG;
|
2017-12-11 02:30:00 +01:00
|
|
|
|
2021-09-27 00:10:28 +02:00
|
|
|
start_offset = read_u32le(0x04, sf);
|
|
|
|
return init_vgmstream_ogg_vorbis_config(sf, start_offset, &ovmi);
|
2018-03-23 16:34:48 +01:00
|
|
|
}
|
2017-12-11 02:30:00 +01:00
|
|
|
|
|
|
|
fail:
|
2018-03-23 16:34:48 +01:00
|
|
|
return NULL;
|
|
|
|
}
|