From badbcf275307a791c8b46824facd37ce740e5cb0 Mon Sep 17 00:00:00 2001 From: Jeff Date: Wed, 9 Sep 2015 16:47:09 -0400 Subject: [PATCH] Fix sound test button --- cockatrice/src/dlg_settings.cpp | 2 +- cockatrice/src/soundengine.cpp | 5 +++++ cockatrice/src/soundengine.h | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cockatrice/src/dlg_settings.cpp b/cockatrice/src/dlg_settings.cpp index da47aa8d..0d5fe8ec 100644 --- a/cockatrice/src/dlg_settings.cpp +++ b/cockatrice/src/dlg_settings.cpp @@ -766,7 +766,7 @@ SoundSettingsPage::SoundSettingsPage() connect(soundPathClearButton, SIGNAL(clicked()), this, SLOT(soundPathClearButtonClicked())); QPushButton *soundPathButton = new QPushButton("..."); connect(soundPathButton, SIGNAL(clicked()), this, SLOT(soundPathButtonClicked())); - connect(&soundTestButton, SIGNAL(clicked()), soundEngine, SLOT(playerJoined())); + connect(&soundTestButton, SIGNAL(clicked()), soundEngine, SLOT(testSound())); masterVolumeSlider = new QSlider(Qt::Horizontal); masterVolumeSlider->setMinimum(0); diff --git a/cockatrice/src/soundengine.cpp b/cockatrice/src/soundengine.cpp index 3f966a7e..68d37d4a 100644 --- a/cockatrice/src/soundengine.cpp +++ b/cockatrice/src/soundengine.cpp @@ -122,4 +122,9 @@ void SoundEngine::playSound(QString fileName) audioData[fileName]->setPosition(0); audioData[fileName]->play(); #endif +} + +void SoundEngine::testSound() +{ + playSound("player_join"); } \ No newline at end of file diff --git a/cockatrice/src/soundengine.h b/cockatrice/src/soundengine.h index 29d91db2..4f55fbeb 100644 --- a/cockatrice/src/soundengine.h +++ b/cockatrice/src/soundengine.h @@ -30,6 +30,8 @@ private slots: public: SoundEngine(QObject *parent = 0); void playSound(QString fileName); +public slots: + void testSound(); }; extern SoundEngine *soundEngine;