diff --git a/src/aymo_score_dro.c b/src/aymo_score_dro.c index 035b424..cbffc71 100644 --- a/src/aymo_score_dro.c +++ b/src/aymo_score_dro.c @@ -112,7 +112,7 @@ int aymo_score_dro_load( if (size < sizeof(struct aymo_score_dro_header)) { return 1; } - const uint8_t* ptr = (const uint8_t*)data; + const uint8_t* ptr = data; const struct aymo_score_dro_header* header = NULL; header = (const struct aymo_score_dro_header*)(const void*)ptr; ptr += sizeof(struct aymo_score_dro_header); diff --git a/src/aymo_score_imf.c b/src/aymo_score_imf.c index ec0d1f3..2e9a135 100644 --- a/src/aymo_score_imf.c +++ b/src/aymo_score_imf.c @@ -133,7 +133,7 @@ int aymo_score_imf_load_specific( score->type = type; if (type) { - const uint8_t* ptr = (const uint8_t*)data; + const uint8_t* ptr = data; uint32_t length_by_header = (ptr[0] | ((uint16_t)ptr[1] << 8u)); length_by_header /= sizeof(struct aymo_score_imf_event); score->length = length_by_header; diff --git a/src/aymo_score_raw.c b/src/aymo_score_raw.c index 53bd148..3356448 100644 --- a/src/aymo_score_raw.c +++ b/src/aymo_score_raw.c @@ -42,7 +42,7 @@ static void aymo_score_raw_update_clock( ) { score->clock += (uint16_t)(score->clock == 0u); - score->raw_rate = (AYMO_SCORE_RAW_REFCLK / score->clock); + score->raw_rate = (AYMO_SCORE_RAW_REFCLK / score->clock); // TODO: improve resolution via fixed point 24.8 score->division = (AYMO_SCORE_OPL_RATE_DEFAULT / score->raw_rate); // TODO: improve resolution via fixed point 24.8 score->division += (uint32_t)(score->division == 0u); } @@ -89,7 +89,7 @@ int aymo_score_raw_load( if (size < sizeof(struct aymo_score_raw_header)) { return 1; } - const uint8_t* ptr = (const uint8_t*)data; + const uint8_t* ptr = data; if (((ptr[0] != 'R') || (ptr[1] != 'A') || @@ -106,9 +106,7 @@ int aymo_score_raw_load( uint32_t length_by_size = (uint32_t)(size - sizeof(struct aymo_score_raw_header)); length_by_size /= sizeof(struct aymo_score_raw_event); - if (score->length > length_by_size) { - score->length = length_by_size; - } + score->length = length_by_size; aymo_score_raw_restart(score); return 0; diff --git a/tests/meson.build b/tests/meson.build index 99cfe8a..d0defdf 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -383,10 +383,10 @@ endforeach # [[format, path], ...] aymo_ymf262_compare_suite = [ -# ['raw', '../contrib/adplug/test/testmus/crusader.raw'], - ['dro', '../contrib/adplug/test/testmus/doofus.dro'], + ['raw', '../contrib/adplug/test/testmus/crusader.raw'], +# ['dro', '../contrib/adplug/test/testmus/doofus.dro'], # FIXME: ['dro', '../contrib/adplug/test/testmus/dro_v2.dro'], -# ['raw', '../contrib/adplug/test/testmus/inc.raw'], +# ['raw', '../contrib/adplug/test/testmus/inc.raw'], # FIXME: ['dro', '../contrib/adplug/test/testmus/samurai.dro'], ['imf', '../contrib/adplug/test/testmus/WONDERIN.WLF'], ] diff --git a/tests/test_convert_prologue_inline.h b/tests/test_convert_prologue_inline.h index bdb3a0f..207ec0a 100644 --- a/tests/test_convert_prologue_inline.h +++ b/tests/test_convert_prologue_inline.h @@ -284,7 +284,7 @@ const float* compare_f32(const float* bufp, const float* refp, size_t len, float const void* compare_dirty(const void* bufp, uint8_t refv, size_t size) { - const uint8_t* sp = (const uint8_t*)bufp; + const uint8_t* sp = bufp; const uint8_t* ep = (sp + size); while (sp != ep) { if (*sp != refv) {