diff options
| author | 2019-04-01 15:01:02 +0200 | |
|---|---|---|
| committer | 2019-04-01 15:01:02 +0200 | |
| commit | 1e89e2da2e3740e55642c8ce44c573cd4bbe6ea9 (patch) | |
| tree | 94cfdd5000b6b0d6af1272e89f8b234fd8c484d4 /src/modules/snd/libkvisnd.cpp | |
| parent | Add support for Python 3 (diff) | |
| parent | uintUserListMinimumWidth: Reduce minimum due to account for certain combinati... (diff) | |
| download | KVIrc-1e89e2da2e3740e55642c8ce44c573cd4bbe6ea9.tar.gz KVIrc-1e89e2da2e3740e55642c8ce44c573cd4bbe6ea9.tar.bz2 KVIrc-1e89e2da2e3740e55642c8ce44c573cd4bbe6ea9.zip | |
Merge branch 'master' into python3
Diffstat (limited to 'src/modules/snd/libkvisnd.cpp')
| -rw-r--r-- | src/modules/snd/libkvisnd.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/modules/snd/libkvisnd.cpp b/src/modules/snd/libkvisnd.cpp index a324b91a9..4c56ab380 100644 --- a/src/modules/snd/libkvisnd.cpp +++ b/src/modules/snd/libkvisnd.cpp @@ -49,7 +49,7 @@ #include <QFile> #include <unistd.h> -#include <errno.h> +#include <cerrno> #ifdef COMPILE_ESD_SUPPORT #include <esd.h> @@ -210,22 +210,12 @@ bool KviSoundPlayer::event(QEvent * e) void KviSoundPlayer::detectSoundSystem() { -#ifdef COMPILE_PHONON_SUPPORT - // FIXME: Phonon seems to freeze on windows sometimes.. maybe it's better to auto-detect winmm ? - if(!m_pPhononPlayer) - m_pPhononPlayer = Phonon::createPlayer(Phonon::MusicCategory); - if(m_pPhononPlayer->state() != Phonon::ErrorState) - { - KVI_OPTION_STRING(KviOption_stringSoundSystem) = "phonon"; - return; - } -#endif #if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW) KVI_OPTION_STRING(KviOption_stringSoundSystem) = "winmm"; #else #ifdef COMPILE_ESD_SUPPORT esd_format_t format = ESD_BITS16 | ESD_STREAM | ESD_PLAY | ESD_MONO; - int esd_fd = esd_play_stream(format, 8012, NULL, "kvirc"); + int esd_fd = esd_play_stream(format, 8012, nullptr, "kvirc"); if(esd_fd >= 0) { KVI_OPTION_STRING(KviOption_stringSoundSystem) = "esd"; @@ -655,7 +645,7 @@ KviEsdSoundThread::~KviEsdSoundThread() void KviEsdSoundThread::play() { // ESD has a really nice API - if(!esd_play_file(NULL, m_szFileName.toUtf8().data(), 1)) // this is sync.. FIXME: it can't be stopped! + if(!esd_play_file(nullptr, m_szFileName.toUtf8().data(), 1)) // this is sync.. FIXME: it can't be stopped! qDebug("Could not play sound %s! [ESD]", m_szFileName.toUtf8().data()); } |
