X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=nucleus%2Ftools%2Fsimple_utilities%2Fplaysound.cpp;h=76b4b1d4bd267cf3a6a69440dd742d24b2977b5a;hb=cc02b3d96c6e9029cce4027848657eeca68191bd;hp=c1ddf4b2cfdad31708d7a0bb01fce702d43861a6;hpb=3ea085ec301ed1399dfa1e9f3a240312dc95410b;p=feisty_meow.git diff --git a/nucleus/tools/simple_utilities/playsound.cpp b/nucleus/tools/simple_utilities/playsound.cpp index c1ddf4b2..76b4b1d4 100644 --- a/nucleus/tools/simple_utilities/playsound.cpp +++ b/nucleus/tools/simple_utilities/playsound.cpp @@ -47,12 +47,17 @@ int main(int argc, char *argv[]) return 12; } for (int i = 1; i < argc; i++) { -// out.log(astring(astring::SPRINTF, "soundfile %d: %s", i, argv[i])); + astring sound_file = argv[i]; +out.log(a_sprintf("soundfile %d: %s", i, sound_file.s()), ALWAYS_PRINT); + if (sound_file.ends(".mp3")) { + out.log(astring("skipping MP3 file ") + sound_file, ALWAYS_PRINT); + continue; + } #ifdef __WIN32__ - if (!PlaySound(to_unicode_temp(argv[i]), NIL, SND_FILENAME)) - out.log(astring("failed to play ") + argv[i], ALWAYS_PRINT); + if (!PlaySound(to_unicode_temp(sound_file), NULL_POINTER, SND_FILENAME)) + out.log(astring("failed to play ") + sound_file, ALWAYS_PRINT); #else - out.log(astring("this program is a NO-OP, ignoring ") + argv[i], ALWAYS_PRINT); + out.log(astring("this program is a NO-OP, ignoring ") + sound_file, ALWAYS_PRINT); #endif } return 0; @@ -60,14 +65,32 @@ int main(int argc, char *argv[]) #ifdef __BUILD_STATIC_APPLICATION__ // static dependencies found by buildor_gen_deps.sh: + #include #include #include #include + #include #include #include + #include + #include + #include + #include + #include + #include + #include + #include + #include #include + #include + #include #include #include + #include + #include + #include #include + #include + #include #endif // __BUILD_STATIC_APPLICATION__