I think Darwin shouldn't define LINUX.
Add framework for the OSS driver (not yet used).
This commit is contained in:
@@ -13,8 +13,10 @@
|
||||
#include "arch_default.h"
|
||||
|
||||
/* Override them with arch-specific drivers, as available. */
|
||||
#if defined(LINUX) && !(defined DARWIN)
|
||||
#if defined(LINUX)
|
||||
#include "arch_linux.h"
|
||||
#elif defined(DARWIN)
|
||||
// #include "arch_darwin.h"
|
||||
#elif defined(WIN32)
|
||||
#include "arch_Win32.h"
|
||||
#endif
|
||||
@@ -35,6 +37,11 @@ void MakeInputHandlers(vector<InputHandler *> &Add)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(LINUX)
|
||||
// #define HAVE_OSS
|
||||
#define HAVE_ALSA
|
||||
#endif
|
||||
|
||||
/* Err, this is ugly--breaks arch encapsulation. Hmm. */
|
||||
RageSoundDriver *MakeRageSoundDriver(CString drivers)
|
||||
{
|
||||
@@ -55,8 +62,11 @@ RageSoundDriver *MakeRageSoundDriver(CString drivers)
|
||||
if(!DriversToTry[i].CompareNoCase("DirectSound-sw")) ret = new RageSound_DSound_Software;
|
||||
if(!DriversToTry[i].CompareNoCase("WaveOut")) ret = new RageSound_WaveOut;
|
||||
#endif
|
||||
#if defined(LINUX) && !defined(DARWIN) /* should use some define akin to HAS_ALSA9 */
|
||||
#ifdef HAVE_ALSA
|
||||
if(!DriversToTry[i].CompareNoCase("ALSA9")) ret = new RageSound_ALSA9;
|
||||
#endif
|
||||
#ifdef HAVE_OSS
|
||||
if(!DriversToTry[i].CompareNoCase("OSS")) ret = new RageSound_OSS;
|
||||
#endif
|
||||
if(!DriversToTry[i].CompareNoCase("Null")) ret = new RageSound_Null;
|
||||
if( !ret )
|
||||
|
||||
@@ -17,9 +17,12 @@ LowLevelWindow *MakeLowLevelWindow();
|
||||
void MakeInputHandlers(vector<InputHandler *> &Add);
|
||||
RageSoundDriver *MakeRageSoundDriver(CString drivers);
|
||||
|
||||
/* Define the default list of sound drivers for each arch. */
|
||||
#if defined(LINUX) && !defined(DARWIN)
|
||||
#define DEFAULT_SOUND_DRIVER_LIST "ALSA9,Null"
|
||||
/* Define the default list of sound drivers for each arch. It's
|
||||
* OK to list drivers that may not be available. */
|
||||
#if defined(LINUX)
|
||||
#define DEFAULT_SOUND_DRIVER_LIST "ALSA9,OSS,Null"
|
||||
#elif defined(DARWIN)
|
||||
#define DEFAULT_SOUND_DRIVER_LIST "Null" /* XXX */
|
||||
#elif defined(WIN32)
|
||||
#define DEFAULT_SOUND_DRIVER_LIST "DirectSound,DirectSound-sw,WaveOut"
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user