Match authentic per-map music track mapping from HIOCTANE.EXE
This commit is contained in:
1 parent
8e6bb5540b
commit
0848f4ffd2
3 files changed
+43
-2
No files matched your search
@@ -6,6 +6,7 @@
|
||||
#include "core/vfs.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
@@ -334,6 +335,37 @@ int main() {
|
||||
CHECK(stop_all_st.finite_ok && stop_all_st.peak == 0.0f);
|
||||
}
|
||||
|
||||
// 9. Authentic per-map music mapping (HIOCTANE.EXE: Maps 1-2=TGAME1, 3-4=TGAME2, 5-6=TGAME4, 7-9=TGAME3)
|
||||
{
|
||||
constexpr std::array<audio::MusicTrackId, 9> kExpectedTrackIds = {
|
||||
audio::MusicTrackId::Game1, audio::MusicTrackId::Game1,
|
||||
audio::MusicTrackId::Game2, audio::MusicTrackId::Game2,
|
||||
audio::MusicTrackId::Game4, audio::MusicTrackId::Game4,
|
||||
audio::MusicTrackId::Game3, audio::MusicTrackId::Game3, audio::MusicTrackId::Game3,
|
||||
};
|
||||
constexpr std::array<const char*, 9> kExpectedOplNames = {
|
||||
"TGAME1.XMI", "TGAME1.XMI",
|
||||
"TGAME2.XMI", "TGAME2.XMI",
|
||||
"TGAME4.XMI", "TGAME4.XMI",
|
||||
"TGAME3.XMI", "TGAME3.XMI", "TGAME3.XMI",
|
||||
};
|
||||
constexpr std::array<const char*, 9> kExpectedWtNames = {
|
||||
"TGAME1.WTB", "TGAME1.WTB",
|
||||
"TGAME2.WTB", "TGAME2.WTB",
|
||||
"TGAME4.WTB", "TGAME4.WTB",
|
||||
"TGAME3.WTB", "TGAME3.WTB", "TGAME3.WTB",
|
||||
};
|
||||
for (int t = 1; t <= 9; ++t) {
|
||||
const audio::MusicTrackId tid = audio::music_track_for_level(t);
|
||||
const size_t idx = static_cast<size_t>(t - 1);
|
||||
CHECK(tid == kExpectedTrackIds[idx]);
|
||||
const auto& opl_seq = eng.xmi_sequence(MusicBackend::Opl3, tid);
|
||||
const auto& wt_seq = eng.xmi_sequence(MusicBackend::SoundFont, tid);
|
||||
CHECK(opl_seq.name == kExpectedOplNames[idx] && !opl_seq.events.empty());
|
||||
CHECK(wt_seq.name == kExpectedWtNames[idx] && !wt_seq.events.empty());
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "[PASS] AudioEngine, OPL3 FM, SoundFont SBK, Normalization & Limiter validated\n";
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user