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