mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-12 01:30:49 +01:00
Add .MED RIFF using MS-IMA/PCM [LA Rush, Psi-Ops (PC)]
This commit is contained in:
parent
f521803f85
commit
3b4f0aae01
@ -168,6 +168,7 @@ DECLARE_MULTIPLE_FILE_TYPE("MCA Audio File (*.MCA)", mca);
|
||||
DECLARE_MULTIPLE_FILE_TYPE("MCG Audio File (*.MCG)", mcg);
|
||||
DECLARE_MULTIPLE_FILE_TYPE("MDS Audio File (*.MDS)", mds);
|
||||
DECLARE_MULTIPLE_FILE_TYPE("MDSP Audio File (*.MDSP)", mdsp);
|
||||
DECLARE_MULTIPLE_FILE_TYPE("MED Audio File (*.MED)", med);
|
||||
DECLARE_MULTIPLE_FILE_TYPE("MI4 Audio File (*.MI4)", mi4);
|
||||
DECLARE_MULTIPLE_FILE_TYPE("MIB Audio File (*.MIB)", mib);
|
||||
DECLARE_MULTIPLE_FILE_TYPE("MIC Audio File (*.MIC)", mic);
|
||||
|
@ -160,6 +160,7 @@ static const char* extension_list[] = {
|
||||
"mcg",
|
||||
"mds",
|
||||
"mdsp",
|
||||
"med",
|
||||
"mi4",
|
||||
"mib",
|
||||
"mic",
|
||||
|
@ -98,6 +98,7 @@ int read_fmt(int big_endian,
|
||||
int sns,
|
||||
int mwv) {
|
||||
|
||||
int codec;
|
||||
int32_t (*read_32bit)(off_t,STREAMFILE*) = NULL;
|
||||
int16_t (*read_16bit)(off_t,STREAMFILE*) = NULL;
|
||||
|
||||
@ -116,7 +117,13 @@ int read_fmt(int big_endian,
|
||||
fmt->channel_count = read_16bit(current_chunk+0x0a,streamFile);
|
||||
fmt->block_size = read_16bit(current_chunk+0x14,streamFile);
|
||||
|
||||
switch ((uint16_t)read_16bit(current_chunk+0x8,streamFile)) {
|
||||
codec = (uint16_t)read_16bit(current_chunk+0x8,streamFile);
|
||||
|
||||
/* 0x007A is apparently "Voxware SC3" but in .MED it's just fake MS-IMA */
|
||||
if (check_extensions(streamFile,"med") && codec == 0x007A)
|
||||
codec = 0x11;
|
||||
|
||||
switch (codec) {
|
||||
case 1: /* PCM */
|
||||
switch (read_16bit(current_chunk+0x16,streamFile)) {
|
||||
case 16:
|
||||
@ -246,6 +253,7 @@ VGMSTREAM * init_vgmstream_riff(STREAMFILE *streamFile) {
|
||||
#ifndef VGM_USE_FFMPEG
|
||||
&& strcasecmp("sgb",filename_extension(filename)) /* SGB has proper support with FFmpeg in sgxd */
|
||||
#endif
|
||||
&& strcasecmp("med",filename_extension(filename))
|
||||
)
|
||||
{
|
||||
if (!strcasecmp("mwv",filename_extension(filename)))
|
||||
|
Loading…
Reference in New Issue
Block a user