aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/snd/libkvisnd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/snd/libkvisnd.cpp')
-rw-r--r--src/modules/snd/libkvisnd.cpp16
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());
}