Files
jak-project/game/sound/989snd/sndplay.cpp
T
Tyler Wilding 6446389263 extractor: cleanup, support unicode properly, and add multi-game support (#1609)
* extractor: refactor and cleanup for multi-game support

* deps: switch to `ghc::filesystem` as it is utf-8 everywhere by default

* extractor: finally working with unicode

* unicode: fix unicode cli args on windows in all `main` functions
2022-07-05 20:38:13 -04:00

28 lines
507 B
C++

#include "player.h"
int main(int argc, char* argv[]) {
snd::player player;
unsigned bankid = 0;
fs::path file = argv[1];
if (argc > 2) {
bankid = player.load_bank(file, 0);
unsigned sound = player.play_sound(bankid, atoi(argv[2]), 0x400, 0, 0, 0);
fmt::print("sound {} started\n", sound);
}
while (true) {
timespec rqtp{}, rmtp{};
rqtp.tv_nsec = 0;
rqtp.tv_sec = 1;
#ifdef __linux
if (nanosleep(&rqtp, &rmtp) == -1) {
break;
}
#endif
}
return 0;
}