blob: 40fdf28b1a2c0c709cec82460a420f57cad07384 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
---
frontend/common/src/SoundPlayer.cc | 43 +++++++++++++++++++------------------
1 file changed, 23 insertions(+), 20 deletions(-)
Index: b/frontend/common/src/SoundPlayer.cc
===================================================================
--- a/frontend/common/src/SoundPlayer.cc
+++ b/frontend/common/src/SoundPlayer.cc
@@ -26,37 +26,40 @@ static const char rcsid[] = "$Id: SoundP
#include "debug.hh"
#include "nls.h"
+#ifdef HAVE_REALPATH
+#include <limits.h>
+#include <stdlib.h>
+#endif
+
#include <list>
-#include "SoundPlayer.hh"
#include "Thread.hh"
+
#include "Sound.hh"
+#include "SoundPlayer.hh"
+#include "ISoundDriver.hh"
#include "IConfigurator.hh"
#include "CoreFactory.hh"
#include "Util.hh"
-#ifdef HAVE_GNOME
+#if defined HAVE_GNOME
#include <gdk/gdk.h>
#include "GnomeSoundPlayer.hh"
-#endif
-#ifdef HAVE_KDE
+#elif defined HAVE_KDE
#include "KdeSoundPlayer.hh"
-#endif
-#ifdef PLATFORM_OS_UNIX
+#elif defined PLATFORM_OS_UNIX
#include <X11/Xlib.h>
-#endif
-#ifdef PLATFORM_OS_WIN32
+#elif defined PLATFORM_OS_WIN32
#include <windows.h>
#include "W32SoundPlayer.hh"
-#endif
-#ifdef PLATFORM_OS_OSX
+#elif defined PLATFORM_OS_OSX
#include "OSXSoundPlayer.hh"
-#endif
-#ifdef HAVE_GSTREAMER
+#elif defined HAVE_GSTREAMER
#include "GstSoundPlayer.hh"
#endif
+
const char *SoundPlayer::CFG_KEY_SOUND_ENABLED = "sound/enabled";
const char *SoundPlayer::CFG_KEY_SOUND_DEVICE = "sound/device";
const char *SoundPlayer::CFG_KEY_SOUND_VOLUME = "sound/volume";
@@ -296,16 +299,16 @@ SpeakerPlayer::run()
SoundPlayer::SoundPlayer()
{
driver =
-#if defined(PLATFORM_OS_WIN32)
- new W32SoundPlayer()
-#elif defined(HAVE_KDE)
- new KdeSoundPlayer()
-#elif defined(HAVE_GSTREAMER)
- new GstSoundPlayer()
-#elif defined(HAVE_GNOME)
+#if defined HAVE_GNOME
new GnomeSoundPlayer()
-#elif defined(PLATFORM_OS_OSX)
+#elif defined HAVE_KDE
+ new KdeSoundPlayer()
+#elif defined PLATFORM_OS_WIN32
+ new W32SoundPlayer()
+#elif defined PLATFORM_OS_OSX
new OSXSoundPlayer()
+#elif defined HAVE_GSTREAMER
+ new GstSoundPlayer()
#else
# warning Sound card support disabled.
NULL
|