diff options
Diffstat (limited to 'pacman-c++/audio.cpp')
| -rw-r--r-- | pacman-c++/audio.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/pacman-c++/audio.cpp b/pacman-c++/audio.cpp index d74445a..8726899 100644 --- a/pacman-c++/audio.cpp +++ b/pacman-c++/audio.cpp | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | #include "audio.h" | 1 | #include "audio.h" |
| 2 | #include "constants.h" | ||
| 2 | #include <phonon/AudioOutput> | 3 | #include <phonon/AudioOutput> |
| 3 | #include <QCoreApplication> | 4 | #include <QCoreApplication> |
| 4 | #include <QTimer> | 5 | #include <QTimer> |
| @@ -13,18 +14,19 @@ bool AudioManager::m_working = false; | |||
| 13 | AudioManager::AudioManager() | 14 | AudioManager::AudioManager() |
| 14 | : m_muted(true) | 15 | : m_muted(true) |
| 15 | { | 16 | { |
| 16 | #ifdef SERVER | 17 | if (Constants::server) |
| 17 | qDebug() << "Server has no sound" | 18 | qDebug() << "Server has no sound"; |
| 18 | #else | 19 | else |
| 19 | preload(); | 20 | { |
| 20 | 21 | preload(); | |
| 21 | AudioPlayer *firstplayer = new AudioPlayer(this); | 22 | |
| 22 | firstplayer->test(m_sounds[Sound::WakaWaka]); | 23 | AudioPlayer *firstplayer = new AudioPlayer(this); |
| 23 | m_working = firstplayer->m_working; | 24 | firstplayer->test(m_sounds[Sound::WakaWaka]); |
| 24 | m_players.append(firstplayer); | 25 | m_working = firstplayer->m_working; |
| 25 | 26 | m_players.append(firstplayer); | |
| 26 | m_muted = false; | 27 | |
| 27 | #endif // SERVER | 28 | m_muted = false; |
| 29 | } | ||
| 28 | } | 30 | } |
| 29 | 31 | ||
| 30 | AudioManager *AudioManager::self() | 32 | AudioManager *AudioManager::self() |
