From ce94357ba958fd5692eadedab48f1f7d80dc0999 Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 2 May 2011 21:14:34 +0200 Subject: fix phonon stuff --- pacman-c++/mainwidget.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pacman-c++/mainwidget.cpp b/pacman-c++/mainwidget.cpp index 93fd796..8745bf9 100644 --- a/pacman-c++/mainwidget.cpp +++ b/pacman-c++/mainwidget.cpp @@ -154,9 +154,15 @@ void MainWidget::tick() order.append(static_cast(m_updatepacket.eating_order(i) & Transmission::color_mask)); m_scene->setEatingOrder(order); - /* stop and restart game */ + /* stop game */ stopGame(); - connect(AudioManager::self()->audioPlayer(), SIGNAL(finished()), this, SLOT(startGame())); + + /* and restart game */ + QTimer *timer = new QTimer(this); + timer->setSingleShot(true); + timer->setInterval(Sound::length[Sound::Intro] + Constants::tick); + connect(timer, SIGNAL(timeout()), this, SLOT(startGame())); + timer->start(); AudioManager::self()->play(Sound::Intro, true); } -- cgit v1.2.3