Don't include arch/arch_default.h from anywhere but in arch. RageSoundManager shouldn't depend on the input handler, for example.
This commit is contained in:
@@ -21,8 +21,6 @@
|
||||
|
||||
#include "arch/Sound/RageSoundDriver.h"
|
||||
|
||||
#include "arch/arch_default.h"
|
||||
|
||||
/*
|
||||
* The lock ordering requirements are:
|
||||
* RageSound::Lock before g_SoundManMutex
|
||||
@@ -46,11 +44,7 @@ RageSoundManager::RageSoundManager()
|
||||
static LocalizedString COULDNT_FIND_SOUND_DRIVER( "RageSoundManager", "Couldn't find a sound driver that works" );
|
||||
void RageSoundManager::Init()
|
||||
{
|
||||
RString sDrivers = g_sSoundDrivers;
|
||||
if( sDrivers.empty() )
|
||||
sDrivers = DEFAULT_SOUND_DRIVER_LIST;
|
||||
|
||||
m_pDriver = RageSoundDriver::Create( sDrivers );
|
||||
m_pDriver = RageSoundDriver::Create( g_sSoundDrivers );
|
||||
if( m_pDriver == NULL )
|
||||
RageException::Throw( "%s", COULDNT_FIND_SOUND_DRIVER.GetValue().c_str() );
|
||||
}
|
||||
|
||||
@@ -3,13 +3,14 @@
|
||||
#include "RageLog.h"
|
||||
#include "RageUtil.h"
|
||||
#include "Foreach.h"
|
||||
#include "arch/arch_default.h"
|
||||
|
||||
DriverList RageSoundDriver::m_pDriverList;
|
||||
|
||||
RageSoundDriver *RageSoundDriver::Create( const RString &drivers )
|
||||
RageSoundDriver *RageSoundDriver::Create( const RString& sDrivers )
|
||||
{
|
||||
vector<RString> DriversToTry;
|
||||
split( drivers, ",", DriversToTry, true );
|
||||
split( sDrivers.empty()? DEFAULT_SOUND_DRIVER_LIST:sDrivers, ",", DriversToTry, true );
|
||||
|
||||
FOREACH_CONST( RString, DriversToTry, Driver )
|
||||
{
|
||||
|
||||
@@ -15,6 +15,7 @@ static const int samples_per_block = 512;
|
||||
class RageSoundDriver: public RageDriver
|
||||
{
|
||||
public:
|
||||
/* Pass an empty string to get the default sound driver list. */
|
||||
static RageSoundDriver *Create( const RString &sDrivers );
|
||||
static DriverList m_pDriverList;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user