mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
Ok, project generation didn't really work out. Reverted.
This commit is contained in:
@@ -49,16 +49,16 @@ namespace sound
|
||||
lua_pushinteger(L, t->getSampleRate());
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static const luaL_Reg functions[] = {
|
||||
{ "getChannels", w_Decoder_getChannels },
|
||||
{ "getBits", w_Decoder_getBits },
|
||||
{ "getSampleRate", w_Decoder_getSampleRate },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_decoder(lua_State * L)
|
||||
{
|
||||
static const luaL_Reg functions[] = {
|
||||
{ "getChannels", w_Decoder_getChannels },
|
||||
{ "getBits", w_Decoder_getBits },
|
||||
{ "getSampleRate", w_Decoder_getSampleRate },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
return luax_register_type(L, "Decoder", functions);
|
||||
}
|
||||
|
||||
|
||||
@@ -101,22 +101,21 @@ namespace sound
|
||||
return 1;
|
||||
}
|
||||
|
||||
// List of functions to wrap.
|
||||
static const luaL_Reg functions[] = {
|
||||
{ "newSoundData", w_newSoundData },
|
||||
{ "newDecoder", w_newDecoder },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static const lua_CFunction types[] = {
|
||||
luaopen_sounddata,
|
||||
luaopen_decoder,
|
||||
0
|
||||
};
|
||||
|
||||
int luaopen_love_sound(lua_State * L)
|
||||
{
|
||||
// List of functions to wrap.
|
||||
static const luaL_Reg functions[] = {
|
||||
{ "newSoundData", w_newSoundData },
|
||||
{ "newDecoder", w_newDecoder },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static const lua_CFunction types[] = {
|
||||
luaopen_sounddata,
|
||||
luaopen_decoder,
|
||||
0
|
||||
};
|
||||
|
||||
|
||||
if(instance == 0)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -69,24 +69,22 @@ namespace sound
|
||||
return 1;
|
||||
}
|
||||
|
||||
static const luaL_Reg functions[] = {
|
||||
|
||||
// Data
|
||||
{ "getPointer", w_Data_getPointer },
|
||||
{ "getSize", w_Data_getSize },
|
||||
|
||||
{ "getChannels", w_SoundData_getChannels },
|
||||
{ "getBits", w_SoundData_getBits },
|
||||
{ "getSampleRate", w_SoundData_getSampleRate },
|
||||
{ "setSample", w_SoundData_setSample },
|
||||
{ "getSample", w_SoundData_getSample },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_sounddata(lua_State * L)
|
||||
{
|
||||
static const luaL_Reg functions[] = {
|
||||
|
||||
// Data
|
||||
{ "getPointer", w_Data_getPointer },
|
||||
{ "getSize", w_Data_getSize },
|
||||
|
||||
{ "getChannels", w_SoundData_getChannels },
|
||||
{ "getBits", w_SoundData_getBits },
|
||||
{ "getSampleRate", w_SoundData_getSampleRate },
|
||||
{ "setSample", w_SoundData_setSample },
|
||||
{ "getSample", w_SoundData_getSample },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
return luax_register_type(L, "SoundData", functions);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user