Merge pull request #822 from bnnm/hca

- Add HCA key [Uma Musume (Android)]
- Add partial support for HCA v3.0 (ongoing) [Uma Musume (Android)]
This commit is contained in:
bnnm 2021-03-07 23:26:27 +01:00 committed by GitHub
commit 12becc0ec3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 504 additions and 287 deletions

View File

@ -473,14 +473,19 @@ characters, and BOM is a helper "byte-order" mark). Windows' *notepad* creates f
*"with BOM"* when selecting UTF-8 encoding in *save as* dialog, or you may use other *"with BOM"* when selecting UTF-8 encoding in *save as* dialog, or you may use other
programs like *notepad++.exe* to convert them. programs like *notepad++.exe* to convert them.
More exactly, vgmstream matches filenames and reads tags assuming they are in UTF-8, More exactly, vgmstream needs the file saved in *UTF-8* to match tags and filenames
while foobar/winamp can only read UTF-8 Japanese/extended filenames in a `.m3u` if file (and ignores *BOM*), while foobar/Winamp won't understand UTF-8 *filenames* unless
is saved *with BOM* (opening files manually or with a `playlist.m3u8` won't need BOM). `.m3u` is saved *with BOM* (ignoring tags). Whereas if saved in what Windows calls
"Unicode" (UTF-16) neither may work.
Conversely, if your *filenames* only use English/ANSI characters you may ommit *BOM*,
and if your tags are English only you may save the `.m3u` as ANSI. Or if you only use
`!tags.m3u` for tags and not for opening files (for example opening them manually
or with a `playlist.m3u8`) you won't need BOM either.
Other players may not need BOM (or CRLF), but for consistency use them when dealing Other players may not need BOM (or CRLF), but for consistency use them when dealing
with non-ASCII names and tags. with non-ASCII names and tags.
### Tags with spaces ### Tags with spaces
Some players like foobar accept tags with spaces. To use them surround the tag Some players like foobar accept tags with spaces. To use them surround the tag
with both characters. with both characters.
@ -558,7 +563,8 @@ When tags change behavior varies depending on player:
- *Audacious*: files need to be readded to the playlist - *Audacious*: files need to be readded to the playlist
Currently there is no tool to aid in the creation of these tags, but you can create Currently there is no tool to aid in the creation of these tags, but you can create
a base `.m3u` and edit as a text file. a base `.m3u` and edit as a text file. You may try this python script to make the
base file: https://pastebin.com/Sdu82SAp
vgmstream's "m3u tagging" is meant to be simple to make and share (just a text vgmstream's "m3u tagging" is meant to be simple to make and share (just a text
file), easier to support in multiple players (rather than needing a custom plugin), file), easier to support in multiple players (rather than needing a custom plugin),

File diff suppressed because it is too large Load Diff

View File

@ -117,6 +117,8 @@ void decode_hca(hca_codec_data* data, sample_t* outbuf, int32_t samples_to_do) {
break; break;
} }
data->current_block++;
/* decode frame */ /* decode frame */
status = clHCA_DecodeBlock(data->handle, (void*)(data->data_buffer), blockSize); status = clHCA_DecodeBlock(data->handle, (void*)(data->data_buffer), blockSize);
if (status < 0) { if (status < 0) {
@ -127,7 +129,6 @@ void decode_hca(hca_codec_data* data, sample_t* outbuf, int32_t samples_to_do) {
/* extract samples */ /* extract samples */
clHCA_ReadSamples16(data->handle, data->sample_buffer); clHCA_ReadSamples16(data->handle, data->sample_buffer);
data->current_block++;
data->samples_consumed = 0; data->samples_consumed = 0;
data->samples_filled += data->info.samplesPerBlock; data->samples_filled += data->info.samplesPerBlock;
} }

View File

@ -391,6 +391,9 @@ static const hcakey_info hcakey_list[] = {
/* Sakura Kakumei (iOS/Android) */ /* Sakura Kakumei (iOS/Android) */
{382759}, // 000000000005D727 {382759}, // 000000000005D727
/* Uma Musume (Android) */
{75923756697503}, // 0000450D608C479F
/* Dragalia Lost (iOS/Android) */ /* Dragalia Lost (iOS/Android) */
{2967411924141, subkeys_dgl, sizeof(subkeys_dgl) / sizeof(subkeys_dgl[0]) }, // 000002B2E7889CAD {2967411924141, subkeys_dgl, sizeof(subkeys_dgl) / sizeof(subkeys_dgl[0]) }, // 000002B2E7889CAD