Skip to content

Commit

Permalink
Nuke support for aRts (KDE2/3 sound server) and ESD (Gnome sound serv…
Browse files Browse the repository at this point in the history
…er before 2009)
  • Loading branch information
ctrlaltca committed Jul 24, 2024
1 parent cc4995d commit 76aac8c
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 126 deletions.
11 changes: 0 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -653,17 +653,6 @@ if(Qt${QT_VERSION_MAJOR}Multimedia_FOUND)
list(APPEND CMAKE_STATUS_AUDIO_BACKENDS "Qt${QT_VERSION_MAJOR}Multimedia")
endif()

# ESD
option(WANT_ESD "Whether to compile ESD support" ON)
if(WANT_ESD)
find_package(ESD)
if(ESD_FOUND)
set(COMPILE_ESD_SUPPORT 1)
list(APPEND LIBS ${ESD_LIBRARY})
list(APPEND CMAKE_STATUS_AUDIO_BACKENDS "Esd")
endif()
endif()

# oss + audiofile
option(WANT_OSS "Whether to compile OSS support" ON)
option(WANT_AUDIOFILE "Whether to compile audiofile support" ON)
Expand Down
1 change: 0 additions & 1 deletion cmake/kvi_sysconfig.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#cmakedefine COMPILE_ZLIB_SUPPORT 1

#cmakedefine COMPILE_PHONON_SUPPORT 1
#cmakedefine COMPILE_ESD_SUPPORT 1
#cmakedefine COMPILE_OSS_SUPPORT 1
#cmakedefine COMPILE_QTMULTIMEDIA_SUPPORT 1
#cmakedefine HAVE_LINUX_SOUNDCARD_H 1
Expand Down
23 changes: 0 additions & 23 deletions cmake/modules/FindESD.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion dist/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ NOT_INSTALLED := \
override_dh_auto_configure:
dh_auto_configure -- -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DWANT_COEXISTENCE=OFF \
-DWANT_ESD=OFF -DWANT_OSS=OFF \
-DWANT_OSS=OFF \
-DWANT_STRIP=OFF \
-DMANUAL_REVISION="$(REV)" -DMANUAL_SOURCES_DATE=$(DATE)\
-DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" -DCMAKE_VERBOSE_MAKEFILE=False
Expand Down
3 changes: 0 additions & 3 deletions src/kvilib/config/KviBuildInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ const QStringList feature_list{
#ifdef COMPILE_OSS_SUPPORT
"OSS",
#endif
#ifdef COMPILE_ESD_SUPPORT
"ESD",
#endif
#ifdef COMPILE_AUDIOFILE_SUPPORT
"Audiofile",
#endif
Expand Down
55 changes: 0 additions & 55 deletions src/modules/snd/libkvisnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@
#include <unistd.h>
#include <cerrno>

#ifdef COMPILE_ESD_SUPPORT
#include <esd.h>
#endif //COMPILE_ESD_SUPPORT

#ifdef COMPILE_OSS_SUPPORT
#include <fcntl.h>
#include <sys/ioctl.h>
Expand Down Expand Up @@ -116,10 +112,6 @@ KviSoundPlayer::KviSoundPlayer()
m_pSoundSystemDict->insert("oss", new KviSoundPlayerEntry(KVI_PTR2MEMBER(KviSoundPlayer::playOss), KVI_PTR2MEMBER(KviSoundPlayer::cleanupOss)));
#endif //COMPILE_OSS_SUPPORT

#ifdef COMPILE_ESD_SUPPORT
m_pSoundSystemDict->insert("esd", new KviSoundPlayerEntry(KVI_PTR2MEMBER(KviSoundPlayer::playEsd), KVI_PTR2MEMBER(KviSoundPlayer::cleanupEsd)));
#endif //COMPILE_ESD_SUPPORT

#endif //!COMPILE_ON_WINDOWS

#ifdef COMPILE_QTMULTIMEDIA_SUPPORT
Expand Down Expand Up @@ -235,15 +227,6 @@ bool KviSoundPlayer::detectSoundSystem(QString & szSoundSystem)
szSoundSystem = "qt";
return true;
#endif
#ifdef COMPILE_ESD_SUPPORT
esd_format_t format = ESD_BITS16 | ESD_STREAM | ESD_PLAY | ESD_MONO;
int esd_fd = esd_play_stream(format, 8012, nullptr, "kvirc");
if(esd_fd >= 0)
{
szSoundSystem = "esd";
return true;
}
#endif
#ifdef COMPILE_OSS_SUPPORT
#ifdef COMPILE_AUDIOFILE_SUPPORT
szSoundSystem = "oss+audiofile";
Expand Down Expand Up @@ -345,24 +328,6 @@ void KviSoundPlayer::cleanupOss()
{
}
#endif //COMPILE_OSS_SUPPORT
#ifdef COMPILE_ESD_SUPPORT
bool KviSoundPlayer::playEsd(const QString & szFileName)
{
if(isMuted())
return true;
KviEsdSoundThread * t = new KviEsdSoundThread(szFileName);
if(!t->start())
{
delete t;
return false;
}
return true;
}

void KviSoundPlayer::cleanupEsd()
{
}
#endif //COMPILE_ESD_SUPPORT
#endif //!COMPILE_ON_WINDOWS

#ifdef COMPILE_QTMULTIMEDIA_SUPPORT
Expand Down Expand Up @@ -669,26 +634,6 @@ void KviOssSoundThread::play()
}

#endif //COMPILE_OSS_SUPPORT

#ifdef COMPILE_ESD_SUPPORT

KviEsdSoundThread::KviEsdSoundThread(const QString & szFileName)
: KviSoundThread(szFileName)
{
}

KviEsdSoundThread::~KviEsdSoundThread()
{
}

void KviEsdSoundThread::play()
{
// ESD has a really nice API
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());
}

#endif //COMPILE_ESD_SUPPORT
#endif //!COMPILE_ON_WINDOWS

/*
Expand Down
32 changes: 0 additions & 32 deletions src/modules/snd/libkvisnd.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,30 +78,6 @@ class KviOssAudiofileSoundThread : public KviSoundThread
};
#endif //COMPILE_AUDIOFILE_SUPPORT
#endif //COMPILE_OSS_SUPPORT

#ifdef COMPILE_ESD_SUPPORT
class KviEsdSoundThread : public KviSoundThread
{
public:
KviEsdSoundThread(const QString & szFileName);
virtual ~KviEsdSoundThread();

protected:
virtual void play();
};
#endif //COMPILE_ESD_SUPPORT

#ifdef COMPILE_ARTS_SUPPORT
class KviArtsSoundThread : public KviSoundThread
{
public:
KviArtsSoundThread(const QString & szFileName);
virtual ~KviArtsSoundThread();

protected:
virtual void play();
};
#endif //COMPILE_ARTS_SUPPORT
#endif //!COMPILE_ON_WINDOWS

#ifdef COMPILE_PHONON_SUPPORT
Expand Down Expand Up @@ -198,14 +174,6 @@ class KviSoundPlayer : public QObject
void cleanupOssAudiofile();
#endif //COMPILE_AUDIOFILE_SUPPORT
#endif //COMPILE_OSS_SUPPORT
#ifdef COMPILE_ARTS_SUPPORT
bool playArts(const QString & szFileName);
void cleanupArts();
#endif //COMPILE_ARTS_SUPPORT
#ifdef COMPILE_ESD_SUPPORT
bool playEsd(const QString & szFileName);
void cleanupEsd();
#endif //COMPILE_ESD_SUPPORT
#endif //!COMPILE_ON_WINDOWS
#ifdef COMPILE_QTMULTIMEDIA_SUPPORT
bool playQt(const QString & szFileName);
Expand Down

0 comments on commit 76aac8c

Please sign in to comment.