From f35fcbc050f34d18fada44094cc55151ea0a69b9 Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Mon, 1 Jul 2024 00:46:21 +0800 Subject: [PATCH] ui: remove tests/playsound.cc (#32870) remove playsound.cc old-commit-hash: a312a102aa05cd5759912de612fc0adb0ae25c19 --- selfdrive/ui/tests/.gitignore | 2 -- selfdrive/ui/tests/playsound.cc | 30 ------------------------------ 2 files changed, 32 deletions(-) delete mode 100644 selfdrive/ui/tests/playsound.cc diff --git a/selfdrive/ui/tests/.gitignore b/selfdrive/ui/tests/.gitignore index 6c624b66d3..8e0147f988 100644 --- a/selfdrive/ui/tests/.gitignore +++ b/selfdrive/ui/tests/.gitignore @@ -1,6 +1,4 @@ test -playsound -test_sound test_translations ui_snapshot test_ui/report \ No newline at end of file diff --git a/selfdrive/ui/tests/playsound.cc b/selfdrive/ui/tests/playsound.cc deleted file mode 100644 index 6487d04790..0000000000 --- a/selfdrive/ui/tests/playsound.cc +++ /dev/null @@ -1,30 +0,0 @@ -#include -#include -#include -#include - -int main(int argc, char **argv) { - - QApplication a(argc, argv); - - QTimer::singleShot(0, [=]{ - QSoundEffect s; - const char *vol = getenv("VOLUME"); - s.setVolume(vol ? atof(vol) : 1.0); - for (int i = 1; i < argc; i++) { - QString fn = argv[i]; - qDebug() << "playing" << fn; - - QEventLoop loop; - s.setSource(QUrl::fromLocalFile(fn)); - QEventLoop::connect(&s, &QSoundEffect::loadedChanged, &loop, &QEventLoop::quit); - loop.exec(); - s.play(); - QEventLoop::connect(&s, &QSoundEffect::playingChanged, &loop, &QEventLoop::quit); - loop.exec(); - } - QCoreApplication::exit(); - }); - - return a.exec(); -}