From d0eafb0124a39eeda6c00595a943ce9811d589c4 Mon Sep 17 00:00:00 2001 From: manuel Date: Sun, 10 Apr 2011 20:50:54 +0200 Subject: major audio rewrite --- pacman-c++/client.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'pacman-c++/client.cpp') diff --git a/pacman-c++/client.cpp b/pacman-c++/client.cpp index c35510a..394b446 100644 --- a/pacman-c++/client.cpp +++ b/pacman-c++/client.cpp @@ -1,6 +1,6 @@ #include "client.h" #include "clicklabel.h" -#include "audioplayer.h" +#include "audio.h" #include "pacman.pb.h" Client::Client() @@ -25,9 +25,9 @@ void Client::createMenu() toggleSound->setFixedHeight(16); toggleSound->setAlignment(Qt::AlignBottom); - bool sound = AudioPlayer::self()->isWorking(); + bool sound = AudioManager::self()->isWorking(); bool muted = !(sound && m_settings->value("muted", false).toBool()); - AudioPlayer::self()->setMuted(muted); + AudioManager::self()->setMuted(muted); QImage img(muted ? ":/soundoff" : ":/soundon"); img.setColor(1, menuBar()->palette().color( @@ -38,7 +38,7 @@ void Client::createMenu() if (sound) { connect(toggleSound, SIGNAL(clicked()), this, SLOT(toggleSound())); - connect(AudioPlayer::self(), SIGNAL(mutedChanged(bool)), this, SLOT(mutedChanged(bool))); + connect(AudioManager::self(), SIGNAL(mutedChanged(bool)), this, SLOT(mutedChanged(bool))); } menuBar()->setCornerWidget(toggleSound); @@ -46,9 +46,9 @@ void Client::createMenu() void Client::toggleSound() const { - if (!AudioPlayer::self()->isWorking()) + if (!AudioManager::self()->isWorking()) return; - AudioPlayer::self()->setMuted(!AudioPlayer::self()->isMuted()); + AudioManager::self()->setMuted(!AudioManager::self()->isMuted()); } void Client::mutedChanged(bool muted) const -- cgit v1.2.3