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