Updated HCA decoder.

This commit is contained in:
Chris Moeller 2016-06-29 19:56:20 -07:00
parent 5200ed4a91
commit 4c75e6a5bc
3 changed files with 577 additions and 482 deletions

View File

@ -20,6 +20,7 @@ typedef struct clHCA clHCA;
/* In case you wish to allocate the structure on your own. */
int clHCA_sizeof();
void clHCA_clear(clHCA *, unsigned int ciphKey1, unsigned int ciphKey2);
void clHCA_done(clHCA *);
/* Or you could let the library allocate it. */
clHCA * clHCA_new(unsigned int ciphKey1, unsigned int ciphKey2);
@ -47,9 +48,10 @@ typedef struct clHCA_stInfo {
unsigned int channelCount;
unsigned int blockSize;
unsigned int blockCount;
unsigned int loopEnabled;
unsigned int loopEnabled;
unsigned int loopStart;
unsigned int loopEnd;
const char *comment;
} clHCA_stInfo;
/* Retrieve information relevant for decoding and playback with this function.
@ -63,4 +65,3 @@ int clHCA_getInfo(clHCA *, clHCA_stInfo *out);
#endif
#endif

File diff suppressed because it is too large Load Diff

View File

@ -635,6 +635,8 @@ void close_vgmstream(VGMSTREAM * vgmstream) {
if (vgmstream->coding_type==coding_CRI_HCA) {
hca_codec_data *data = (hca_codec_data *) vgmstream->codec_data;
if (vgmstream->codec_data) {
clHCA *hca = (clHCA *)(data + 1);
clHCA_done(hca);
if (data->streamfile) close_streamfile(data->streamfile);
free(vgmstream->codec_data);
vgmstream->codec_data = NULL;