Added global lua function for fetching the list of available sound drivers. Moved WaveOut to the front of the list to make it the first driver to try on Windows.
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
#include "SongUtil.h"
|
||||
#include "LuaManager.h"
|
||||
|
||||
#include "arch/Sound/RageSoundDriver.h"
|
||||
|
||||
GameSoundManager *SOUND = NULL;
|
||||
|
||||
/*
|
||||
@@ -869,7 +871,22 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
LUA_REGISTER_CLASS( GameSoundManager )
|
||||
LUA_REGISTER_CLASS(GameSoundManager);
|
||||
|
||||
int LuaFunc_get_sound_driver_list(lua_State* L);
|
||||
int LuaFunc_get_sound_driver_list(lua_State* L)
|
||||
{
|
||||
vector<RString> driver_names;
|
||||
split(RageSoundDriver::GetDefaultSoundDriverList(), ",", driver_names, true);
|
||||
lua_createtable(L, driver_names.size(), 0);
|
||||
for(size_t n= 0; n < driver_names.size(); ++n)
|
||||
{
|
||||
lua_pushstring(L, driver_names[n].c_str());
|
||||
lua_rawseti(L, -2, n+1);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
LUAFUNC_REGISTER_COMMON(get_sound_driver_list);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user