mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Ok, project generation didn't really work out. Reverted.
This commit is contained in:
@@ -54,6 +54,8 @@ namespace openal
|
||||
{
|
||||
SDL_KillThread(thread);
|
||||
|
||||
pool->stop();
|
||||
|
||||
delete pool;
|
||||
|
||||
alcMakeContextCurrent(0);
|
||||
|
||||
@@ -206,37 +206,37 @@ namespace audio
|
||||
return 3;
|
||||
}
|
||||
|
||||
// List of functions to wrap.
|
||||
static const luaL_Reg functions[] = {
|
||||
{ "getNumSources", w_getNumSources },
|
||||
{ "newSound", w_newSound },
|
||||
{ "newMusic", w_newMusic },
|
||||
{ "newSource", w_newSource },
|
||||
{ "play", w_play },
|
||||
{ "stop", w_stop },
|
||||
{ "pause", w_pause },
|
||||
{ "resume", w_resume },
|
||||
{ "rewind", w_rewind },
|
||||
{ "setVolume", w_setVolume },
|
||||
{ "getVolume", w_getVolume },
|
||||
{ "setPosition", w_setPosition },
|
||||
{ "getPosition", w_getPosition },
|
||||
{ "setOrientation", w_setOrientation },
|
||||
{ "getOrientation", w_getOrientation },
|
||||
{ "setVelocity", w_setVelocity },
|
||||
{ "getVelocity", w_getVelocity },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static const lua_CFunction types[] = {
|
||||
luaopen_source,
|
||||
luaopen_music,
|
||||
luaopen_sound,
|
||||
0
|
||||
};
|
||||
|
||||
int luaopen_love_audio(lua_State * L)
|
||||
{
|
||||
// List of functions to wrap.
|
||||
static const luaL_Reg functions[] = {
|
||||
{ "getNumSources", w_getNumSources },
|
||||
{ "newSound", w_newSound },
|
||||
{ "newMusic", w_newMusic },
|
||||
{ "newSource", w_newSource },
|
||||
{ "play", w_play },
|
||||
{ "stop", w_stop },
|
||||
{ "pause", w_pause },
|
||||
{ "resume", w_resume },
|
||||
{ "rewind", w_rewind },
|
||||
{ "setVolume", w_setVolume },
|
||||
{ "getVolume", w_getVolume },
|
||||
{ "setPosition", w_setPosition },
|
||||
{ "getPosition", w_getPosition },
|
||||
{ "setOrientation", w_setOrientation },
|
||||
{ "getOrientation", w_getOrientation },
|
||||
{ "setVelocity", w_setVelocity },
|
||||
{ "getVelocity", w_getVelocity },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static const lua_CFunction types[] = {
|
||||
luaopen_source,
|
||||
luaopen_music,
|
||||
luaopen_sound,
|
||||
0
|
||||
};
|
||||
|
||||
if(instance == 0)
|
||||
{
|
||||
// Try OpenAL first.
|
||||
|
||||
@@ -29,14 +29,12 @@ namespace audio
|
||||
return luax_checktype<Music>(L, idx, "Music", AUDIO_MUSIC_T);
|
||||
}
|
||||
|
||||
|
||||
static const luaL_Reg functions[] = {
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_music(lua_State * L)
|
||||
{
|
||||
static const luaL_Reg functions[] = {
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
return luax_register_type(L, "Music", functions);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,12 +29,12 @@ namespace audio
|
||||
return luax_checktype<Sound>(L, idx, "Sound", AUDIO_SOUND_T);
|
||||
}
|
||||
|
||||
static const luaL_Reg functions[] = {
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_sound(lua_State * L)
|
||||
{
|
||||
static const luaL_Reg functions[] = {
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
return luax_register_type(L, "Sound", functions);
|
||||
}
|
||||
|
||||
|
||||
@@ -139,18 +139,18 @@ namespace audio
|
||||
return 1;
|
||||
}
|
||||
|
||||
static const luaL_Reg functions[] = {
|
||||
{ "setPitch", w_Source_setPitch },
|
||||
{ "getPitch", w_Source_getPitch },
|
||||
{ "setVolume", w_Source_setVolume },
|
||||
{ "getVolume", w_Source_getVolume },
|
||||
{ "setLooping", w_Source_setLooping },
|
||||
{ "isLooping", w_Source_isLooping },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_source(lua_State * L)
|
||||
{
|
||||
static const luaL_Reg functions[] = {
|
||||
{ "setPitch", w_Source_setPitch },
|
||||
{ "getPitch", w_Source_getPitch },
|
||||
{ "setVolume", w_Source_setVolume },
|
||||
{ "getVolume", w_Source_getVolume },
|
||||
{ "setLooping", w_Source_setLooping },
|
||||
{ "isLooping", w_Source_isLooping },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
return luax_register_type(L, "Source", functions);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user