Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 277018
Collapse All | Expand All

(-)frontend/common/src/SoundPlayer.cc (-20 / +25 lines)
Lines 26-62 Link Here
26
#include "debug.hh"
26
#include "debug.hh"
27
#include "nls.h"
27
#include "nls.h"
28
28
29
#ifdef HAVE_REALPATH
30
#include <limits.h>
31
#include <stdlib.h>
32
#endif
33
29
#include <list>
34
#include <list>
30
35
31
#include "SoundPlayer.hh"
32
#include "Thread.hh"
36
#include "Thread.hh"
37
33
#include "Sound.hh"
38
#include "Sound.hh"
39
#include "SoundPlayer.hh"
40
#include "ISoundDriver.hh"
34
41
35
#include "IConfigurator.hh"
42
#include "IConfigurator.hh"
36
#include "CoreFactory.hh"
43
#include "CoreFactory.hh"
37
#include "Util.hh"
44
#include "Util.hh"
38
45
39
#ifdef HAVE_GNOME
46
#if defined HAVE_GNOME
40
#include <gdk/gdk.h>
47
#include <gdk/gdk.h>
41
#include "GnomeSoundPlayer.hh"
48
#include "GnomeSoundPlayer.hh"
42
#endif
49
#elif defined HAVE_KDE
43
#ifdef HAVE_KDE
44
#include "KdeSoundPlayer.hh"
50
#include "KdeSoundPlayer.hh"
45
#endif
51
#elif defined PLATFORM_OS_UNIX
46
#ifdef PLATFORM_OS_UNIX
47
#include <X11/Xlib.h>
52
#include <X11/Xlib.h>
48
#endif
53
#elif defined PLATFORM_OS_WIN32
49
#ifdef PLATFORM_OS_WIN32
50
#include <windows.h>
54
#include <windows.h>
51
#include "W32SoundPlayer.hh"
55
#include "W32SoundPlayer.hh"
52
#endif
56
#elif defined PLATFORM_OS_OSX
53
#ifdef PLATFORM_OS_OSX
54
#include "OSXSoundPlayer.hh"
57
#include "OSXSoundPlayer.hh"
55
#endif
58
#elif defined HAVE_GSTREAMER
56
#ifdef HAVE_GSTREAMER
57
#include "GstSoundPlayer.hh"
59
#include "GstSoundPlayer.hh"
58
#endif
60
#endif
59
61
62
60
const char *SoundPlayer::CFG_KEY_SOUND_ENABLED = "sound/enabled";
63
const char *SoundPlayer::CFG_KEY_SOUND_ENABLED = "sound/enabled";
61
const char *SoundPlayer::CFG_KEY_SOUND_DEVICE = "sound/device";
64
const char *SoundPlayer::CFG_KEY_SOUND_DEVICE = "sound/device";
62
const char *SoundPlayer::CFG_KEY_SOUND_VOLUME = "sound/volume";
65
const char *SoundPlayer::CFG_KEY_SOUND_VOLUME = "sound/volume";
Lines 296-311 Link Here
296
SoundPlayer::SoundPlayer()
299
SoundPlayer::SoundPlayer()
297
{
300
{
298
  driver =
301
  driver =
299
#if defined(PLATFORM_OS_WIN32)
302
#if defined HAVE_GNOME
300
     new W32SoundPlayer()
301
#elif defined(HAVE_KDE)
302
     new KdeSoundPlayer()
303
#elif defined(HAVE_GSTREAMER)
304
     new GstSoundPlayer()
305
#elif defined(HAVE_GNOME)
306
     new GnomeSoundPlayer()
303
     new GnomeSoundPlayer()
307
#elif defined(PLATFORM_OS_OSX)
304
#elif defined HAVE_KDE
305
     new KdeSoundPlayer()
306
#elif defined PLATFORM_OS_WIN32
307
     new W32SoundPlayer()
308
#elif defined PLATFORM_OS_OSX
308
     new OSXSoundPlayer()
309
     new OSXSoundPlayer()
310
#elif defined HAVE_GSTREAMER
311
     new GstSoundPlayer()
309
#else
312
#else
310
#  warning Sound card support disabled.
313
#  warning Sound card support disabled.
311
     NULL
314
     NULL
Lines 387-392 Link Here
387
void
390
void
388
SoundPlayer::sync_settings()
391
SoundPlayer::sync_settings()
389
{
392
{
393
  if (driver == NULL) return;
394
  
390
  for (unsigned int i = 0; i < sizeof(sound_registry)/sizeof(sound_registry[0]); i++)
395
  for (unsigned int i = 0; i < sizeof(sound_registry)/sizeof(sound_registry[0]); i++)
391
    {
396
    {
392
      SoundRegistry *snd = &sound_registry[i];
397
      SoundRegistry *snd = &sound_registry[i];

Return to bug 277018