Clarified AT3plus as such

This commit is contained in:
Chris Moeller 2013-06-26 04:36:57 -07:00
parent 27f5a4c7fe
commit ae4863b0bf
5 changed files with 15 additions and 15 deletions

View File

@ -5,7 +5,7 @@
#include "coding.h"
#include "../util.h"
void decode_at3(VGMSTREAM * vgmstream,
void decode_at3plus(VGMSTREAM * vgmstream,
sample * outbuf, int channelspacing, int32_t samples_to_do, int channel) {
VGMSTREAMCHANNEL *ch = &vgmstream->ch[0];
maiatrac3plus_codec_data *data = vgmstream->codec_data;

View File

@ -97,7 +97,7 @@ void decode_g7221(VGMSTREAM *vgmstream,
#endif
#ifdef VGM_USE_MAIATRAC3PLUS
void decode_at3(VGMSTREAM *vgmstream,
void decode_at3plus(VGMSTREAM *vgmstream,
sample * outbuf, int channelspacing, int32_t samples_to_do, int channel);
#endif

View File

@ -174,7 +174,7 @@ int read_fmt(int big_endian,
read_32bitLE(current_chunk+0x2C,streamFile) == 0x62CEE401) {
uint16_t bztmp = read_16bit(current_chunk+0x32,streamFile);
bztmp = (bztmp >> 8) | (bztmp << 8);
fmt->coding_type = coding_AT3;
fmt->coding_type = coding_AT3plus;
fmt->block_size = (bztmp & 0x3FF) * 8 + 8;
fmt->interleave = 0;
}
@ -361,7 +361,7 @@ VGMSTREAM * init_vgmstream_riff(STREAMFILE *streamFile) {
case coding_NGC_DSP:
break;
#ifdef VGM_USE_MAIATRAC3PLUS
case coding_AT3:
case coding_AT3plus:
sample_count = (data_size / fmt.block_size) * 2048 * fmt.channel_count;
break;
#endif
@ -409,7 +409,7 @@ VGMSTREAM * init_vgmstream_riff(STREAMFILE *streamFile) {
vgmstream->interleave_block_size = fmt.block_size;
break;
#ifdef VGM_USE_MAIATRAC3PLUS
case coding_AT3:
case coding_AT3plus:
vgmstream->interleave_block_size = fmt.block_size / fmt.channel_count;
#endif
default:
@ -418,7 +418,7 @@ VGMSTREAM * init_vgmstream_riff(STREAMFILE *streamFile) {
}
#ifdef VGM_USE_MAIATRAC3PLUS
if (fmt.coding_type == coding_AT3) {
if (fmt.coding_type == coding_AT3plus) {
maiatrac3plus_codec_data *data = malloc(sizeof(maiatrac3plus_codec_data));
data->buffer = 0;
data->samples_discard = 0;

View File

@ -454,7 +454,7 @@ void reset_vgmstream(VGMSTREAM * vgmstream) {
#endif
#ifdef VGM_USE_MAIATRAC3PLUS
if (vgmstream->coding_type==coding_AT3) {
if (vgmstream->coding_type==coding_AT3plus) {
maiatrac3plus_codec_data *data = vgmstream->codec_data;
if (data->handle) Atrac3plusDecoder_closeContext(data->handle);
@ -653,7 +653,7 @@ void close_vgmstream(VGMSTREAM * vgmstream) {
#endif
#ifdef VGM_USE_MAIATRAC3PLUS
if (vgmstream->coding_type == coding_AT3) {
if (vgmstream->coding_type == coding_AT3plus) {
maiatrac3plus_codec_data *data = vgmstream->codec_data;
if (data)
@ -976,7 +976,7 @@ int get_vgmstream_samples_per_frame(VGMSTREAM * vgmstream) {
return ((mp4_aac_codec_data*)vgmstream->codec_data)->samples_per_frame;
#endif
#ifdef VGM_USE_MAIATRAC3PLUS
case coding_AT3:
case coding_AT3plus:
return 2048 - ((maiatrac3plus_codec_data*)vgmstream->codec_data)->samples_discard;
#endif
default:
@ -1075,7 +1075,7 @@ int get_vgmstream_frame_size(VGMSTREAM * vgmstream) {
case coding_G7221:
#endif
#ifdef VGM_USE_MAIATRAC3PLUS
case coding_AT3:
case coding_AT3plus:
#endif
case coding_MSADPCM:
case coding_MTAF:
@ -1464,9 +1464,9 @@ void decode_vgmstream(VGMSTREAM * vgmstream, int samples_written, int samples_to
break;
#endif
#ifdef VGM_USE_MAIATRAC3PLUS
case coding_AT3:
case coding_AT3plus:
for (chan=0;chan<vgmstream->channels;chan++) {
decode_at3(vgmstream,
decode_at3plus(vgmstream,
buffer+samples_written*vgmstream->channels+chan,
vgmstream->channels,
samples_to_do,
@ -1633,7 +1633,7 @@ int vgmstream_do_loop(VGMSTREAM * vgmstream) {
}
#endif
#ifdef VGM_USE_MAIATRAC3PLUS
if (vgmstream->coding_type==coding_AT3) {
if (vgmstream->coding_type==coding_AT3plus) {
int blocks_to_skip = vgmstream->loop_sample / 2048;
int samples_to_discard = vgmstream->loop_sample % 2048;
maiatrac3plus_codec_data *data = (maiatrac3plus_codec_data *)(vgmstream->codec_data);
@ -1910,7 +1910,7 @@ void describe_vgmstream(VGMSTREAM * vgmstream, char * desc, int length) {
break;
#endif
#ifdef VGM_USE_MAIATRAC3PLUS
case coding_AT3:
case coding_AT3plus:
snprintf(temp,TEMPSIZE,"ATRAC3plus");
break;
#endif

View File

@ -148,7 +148,7 @@ typedef enum {
#endif
#ifdef VGM_USE_MAIATRAC3PLUS
coding_AT3,
coding_AT3plus,
#endif
} coding_t;