mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-30 23:50:19 -07:00
Fix sound test button
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -122,4 +122,9 @@ void SoundEngine::playSound(QString fileName)
|
||||
audioData[fileName]->setPosition(0);
|
||||
audioData[fileName]->play();
|
||||
#endif
|
||||
}
|
||||
|
||||
void SoundEngine::testSound()
|
||||
{
|
||||
playSound("player_join");
|
||||
}
|
||||
@@ -30,6 +30,8 @@ private slots:
|
||||
public:
|
||||
SoundEngine(QObject *parent = 0);
|
||||
void playSound(QString fileName);
|
||||
public slots:
|
||||
void testSound();
|
||||
};
|
||||
|
||||
extern SoundEngine *soundEngine;
|
||||
|
||||
Reference in New Issue
Block a user