Rename wwise_opus to switch_opus as it's apparently so

This commit is contained in:
bnnm 2017-09-30 00:16:40 +02:00
parent 8a8ebe3e24
commit abaefd17cd
8 changed files with 27 additions and 27 deletions

View File

@ -219,7 +219,7 @@ static int ffmpeg_read(void *opaque, uint8_t *buf, int buf_size) {
/* main read */ /* main read */
switch(data->config.type) { switch(data->config.type) {
case FFMPEG_EA_XMA: ret = ffmpeg_custom_read_eaxma(data, buf, buf_size); break; case FFMPEG_EA_XMA: ret = ffmpeg_custom_read_eaxma(data, buf, buf_size); break;
case FFMPEG_WWISE_OPUS: ret = ffmpeg_custom_read_wwise_opus(data, buf, buf_size); break; case FFMPEG_SWITCH_OPUS: ret = ffmpeg_custom_read_switch_opus(data, buf, buf_size); break;
//case FFMPEG_EA_SCHL: ret = ffmpeg_custom_read_ea_schl(data, buf, buf_size); break; //case FFMPEG_EA_SCHL: ret = ffmpeg_custom_read_ea_schl(data, buf, buf_size); break;
//case FFMPEG_SFH: ret = ffmpeg_custom_read_sfh(data, buf, buf_size); break; //case FFMPEG_SFH: ret = ffmpeg_custom_read_sfh(data, buf, buf_size); break;
default: ret = ffmpeg_custom_read_standard(data, buf, buf_size); break; default: ret = ffmpeg_custom_read_standard(data, buf, buf_size); break;
@ -286,7 +286,7 @@ static int64_t ffmpeg_seek(void *opaque, int64_t offset, int whence) {
/* main seek */ /* main seek */
switch(data->config.type) { switch(data->config.type) {
case FFMPEG_EA_XMA: offset = ffmpeg_custom_seek_eaxma(data, offset); break; case FFMPEG_EA_XMA: offset = ffmpeg_custom_seek_eaxma(data, offset); break;
case FFMPEG_WWISE_OPUS: offset = ffmpeg_custom_seek_wwise_opus(data, offset); break; case FFMPEG_SWITCH_OPUS: offset = ffmpeg_custom_seek_switch_opus(data, offset); break;
//case FFMPEG_EA_SCHL: offset = ffmpeg_custom_seek_ea_schl(data, offset); break; //case FFMPEG_EA_SCHL: offset = ffmpeg_custom_seek_ea_schl(data, offset); break;
//case FFMPEG_SFH: offset = ffmpeg_custom_seek_sfh(data, offset); break; //case FFMPEG_SFH: offset = ffmpeg_custom_seek_sfh(data, offset); break;
default: offset = ffmpeg_custom_seek_standard(data, offset); break; default: offset = ffmpeg_custom_seek_standard(data, offset); break;
@ -303,7 +303,7 @@ static int64_t ffmpeg_size(ffmpeg_codec_data * data) {
int64_t bytes; int64_t bytes;
switch(data->config.type) { switch(data->config.type) {
case FFMPEG_EA_XMA: bytes = ffmpeg_custom_size_eaxma(data); break; case FFMPEG_EA_XMA: bytes = ffmpeg_custom_size_eaxma(data); break;
case FFMPEG_WWISE_OPUS: bytes = ffmpeg_custom_size_wwise_opus(data); break; case FFMPEG_SWITCH_OPUS: bytes = ffmpeg_custom_size_switch_opus(data); break;
//case FFMPEG_EA_SCHL: bytes = ffmpeg_custom_size_ea_schl(data); break; //case FFMPEG_EA_SCHL: bytes = ffmpeg_custom_size_ea_schl(data); break;
//case FFMPEG_SFH: bytes = ffmpeg_custom_size_sfh(data); break; //case FFMPEG_SFH: bytes = ffmpeg_custom_size_sfh(data); break;
default: bytes = ffmpeg_custom_size_standard(data); break; default: bytes = ffmpeg_custom_size_standard(data); break;

View File

@ -27,9 +27,9 @@ int ffmpeg_custom_read_eaxma(ffmpeg_codec_data *data, uint8_t *buf, int buf_size
int64_t ffmpeg_custom_seek_eaxma(ffmpeg_codec_data *data, int64_t virtual_offset); int64_t ffmpeg_custom_seek_eaxma(ffmpeg_codec_data *data, int64_t virtual_offset);
int64_t ffmpeg_custom_size_eaxma(ffmpeg_codec_data *data); int64_t ffmpeg_custom_size_eaxma(ffmpeg_codec_data *data);
int ffmpeg_custom_read_wwise_opus(ffmpeg_codec_data *data, uint8_t *buf, int buf_size); int ffmpeg_custom_read_switch_opus(ffmpeg_codec_data *data, uint8_t *buf, int buf_size);
int64_t ffmpeg_custom_seek_wwise_opus(ffmpeg_codec_data *data, int64_t virtual_offset); int64_t ffmpeg_custom_seek_switch_opus(ffmpeg_codec_data *data, int64_t virtual_offset);
int64_t ffmpeg_custom_size_wwise_opus(ffmpeg_codec_data *data); int64_t ffmpeg_custom_size_switch_opus(ffmpeg_codec_data *data);
//int ffmpeg_custom_read_ea_schl(ffmpeg_codec_data *data, uint8_t *buf, int buf_size); //int ffmpeg_custom_read_ea_schl(ffmpeg_codec_data *data, uint8_t *buf, int buf_size);
//int64_t ffmpeg_custom_seek_ea_schl(ffmpeg_codec_data *data, int64_t virtual_offset); //int64_t ffmpeg_custom_seek_ea_schl(ffmpeg_codec_data *data, int64_t virtual_offset);

View File

@ -44,7 +44,7 @@ fail:
} }
int ffmpeg_custom_read_wwise_opus(ffmpeg_codec_data *data, uint8_t *buf, int buf_size) { int ffmpeg_custom_read_switch_opus(ffmpeg_codec_data *data, uint8_t *buf, int buf_size) {
uint8_t v_buf[0x8000]; /* intermediate buffer, could be simplified */ uint8_t v_buf[0x8000]; /* intermediate buffer, could be simplified */
int buf_done = 0; int buf_done = 0;
uint64_t real_offset = data->real_offset; uint64_t real_offset = data->real_offset;
@ -98,7 +98,7 @@ int ffmpeg_custom_read_wwise_opus(ffmpeg_codec_data *data, uint8_t *buf, int buf
return buf_size; return buf_size;
} }
int64_t ffmpeg_custom_seek_wwise_opus(ffmpeg_codec_data *data, int64_t virtual_offset) { int64_t ffmpeg_custom_seek_switch_opus(ffmpeg_codec_data *data, int64_t virtual_offset) {
int64_t real_offset, virtual_base; int64_t real_offset, virtual_base;
int64_t current_virtual_offset = data->virtual_offset; int64_t current_virtual_offset = data->virtual_offset;
@ -138,7 +138,7 @@ int64_t ffmpeg_custom_seek_wwise_opus(ffmpeg_codec_data *data, int64_t virtual_o
return virtual_offset; return virtual_offset;
} }
int64_t ffmpeg_custom_size_wwise_opus(ffmpeg_codec_data *data) { int64_t ffmpeg_custom_size_switch_opus(ffmpeg_codec_data *data) {
uint64_t real_offset = data->real_start; uint64_t real_offset = data->real_start;
uint64_t real_end_offset = data->real_start + data->real_size; uint64_t real_end_offset = data->real_start + data->real_size;
uint64_t virtual_size = data->header_size; uint64_t virtual_size = data->header_size;

View File

@ -1379,7 +1379,7 @@
> >
</File> </File>
<File <File
RelativePath=".\coding\ffmpeg_decoder_utils_wwise_opus.c" RelativePath=".\coding\ffmpeg_decoder_utils_switch_opus.c"
> >
</File> </File>
<File <File

View File

@ -133,7 +133,7 @@
<ClCompile Include="coding\coding_utils.c" /> <ClCompile Include="coding\coding_utils.c" />
<ClCompile Include="coding\ffmpeg_decoder.c" /> <ClCompile Include="coding\ffmpeg_decoder.c" />
<ClCompile Include="coding\ffmpeg_decoder_utils_ea_xma.c" /> <ClCompile Include="coding\ffmpeg_decoder_utils_ea_xma.c" />
<ClCompile Include="coding\ffmpeg_decoder_utils_wwise_opus.c" /> <ClCompile Include="coding\ffmpeg_decoder_utils_switch_opus.c" />
<ClCompile Include="coding\ffmpeg_decoder_utils.c" /> <ClCompile Include="coding\ffmpeg_decoder_utils.c" />
<ClCompile Include="coding\lsf_decoder.c" /> <ClCompile Include="coding\lsf_decoder.c" />
<ClCompile Include="coding\mp4_aac_decoder.c" /> <ClCompile Include="coding\mp4_aac_decoder.c" />

View File

@ -1147,7 +1147,7 @@
<ClCompile Include="coding\ffmpeg_decoder_utils_ea_xma.c"> <ClCompile Include="coding\ffmpeg_decoder_utils_ea_xma.c">
<Filter>coding\Source Files</Filter> <Filter>coding\Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="coding\ffmpeg_decoder_utils_wwise_opus.c"> <ClCompile Include="coding\ffmpeg_decoder_utils_switch_opus.c">
<Filter>coding\Source Files</Filter> <Filter>coding\Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="coding\ffmpeg_decoder_utils.c"> <ClCompile Include="coding\ffmpeg_decoder_utils.c">

View File

@ -496,7 +496,7 @@ VGM_LOG("so=%lx, ds=%x\n", start_offset, ww.data_size);
if (bytes <= 0) goto fail; if (bytes <= 0) goto fail;
memset(&cfg, 0, sizeof(ffmpeg_custom_config)); memset(&cfg, 0, sizeof(ffmpeg_custom_config));
cfg.type = FFMPEG_WWISE_OPUS; cfg.type = FFMPEG_SWITCH_OPUS;
//cfg.big_endian = ww.big_endian; /* internally BE */ //cfg.big_endian = ww.big_endian; /* internally BE */
vgmstream->codec_data = init_ffmpeg_config(streamFile, buf,bytes, start_offset,ww.data_size, &cfg); vgmstream->codec_data = init_ffmpeg_config(streamFile, buf,bytes, start_offset,ww.data_size, &cfg);

View File

@ -1028,8 +1028,8 @@ typedef struct {
/* Custom FFMPEG modes */ /* Custom FFMPEG modes */
typedef enum { typedef enum {
FFMPEG_STANDARD, /* default FFmpeg */ FFMPEG_STANDARD, /* default FFmpeg */
FFMPEG_WWISE_OPUS, /* Opus without Ogg layer */ FFMPEG_SWITCH_OPUS, /* Opus without Ogg layer */
FFMPEG_EA_XMA, /* XMA with padding removed in SNS blocks */ FFMPEG_EA_XMA, /* XMA with padding removed and custom streams in SNS blocks */
//FFMPEG_EA_SCHL, /* Normal header+data (ex. ATRAC3) in SCxx blocks */ //FFMPEG_EA_SCHL, /* Normal header+data (ex. ATRAC3) in SCxx blocks */
//FFMPEG_SFH, /* ATRAC3plus header+data in SFH blocks */ //FFMPEG_SFH, /* ATRAC3plus header+data in SFH blocks */
//FFMPEG_AWC_XMA, /* XMA data in AWC blocks, 1 streams per channel */ //FFMPEG_AWC_XMA, /* XMA data in AWC blocks, 1 streams per channel */