mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
* FIX #4665: Address missing sound on Qt5 Builds * FIX #4665: Address missing sound on Qt5 Builds * Include both engines
This commit is contained in:
parent
4c290aec57
commit
f25e4785ae
3 changed files with 11 additions and 6 deletions
|
|
@ -2,10 +2,13 @@
|
|||
|
||||
#include "settingscache.h"
|
||||
|
||||
#include <QAudioOutput>
|
||||
#include <QDir>
|
||||
#include <QMediaPlayer>
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
#include <QAudioOutput>
|
||||
#endif
|
||||
|
||||
#define DEFAULT_THEME_NAME "Default"
|
||||
#define TEST_SOUND_FILENAME "player_join"
|
||||
|
||||
|
|
@ -23,7 +26,7 @@ SoundEngine::~SoundEngine()
|
|||
{
|
||||
if (player) {
|
||||
player->deleteLater();
|
||||
player = 0;
|
||||
player = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -48,7 +51,7 @@ void SoundEngine::soundEnabledChanged()
|
|||
}
|
||||
}
|
||||
|
||||
void SoundEngine::playSound(QString fileName)
|
||||
void SoundEngine::playSound(const QString &fileName)
|
||||
{
|
||||
if (!player) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue