mirror of https://github.com/bjornbytes/lovr.git
API for Sound:getCapcity
This commit is contained in:
parent
6566423f66
commit
62a2d01daf
|
@ -56,6 +56,13 @@ static int l_lovrSoundGetFrameCount(lua_State* L) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int l_lovrSoundGetCapacity(lua_State* L) {
|
||||||
|
Sound* sound = luax_checktype(L, 1, Sound);
|
||||||
|
uint32_t frames = lovrSoundGetCapacity(sound);
|
||||||
|
lua_pushinteger(L, frames);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static int l_lovrSoundGetSampleCount(lua_State* L) {
|
static int l_lovrSoundGetSampleCount(lua_State* L) {
|
||||||
Sound* sound = luax_checktype(L, 1, Sound);
|
Sound* sound = luax_checktype(L, 1, Sound);
|
||||||
uint32_t frames = lovrSoundGetFrameCount(sound);
|
uint32_t frames = lovrSoundGetFrameCount(sound);
|
||||||
|
@ -241,6 +248,7 @@ const luaL_Reg lovrSound[] = {
|
||||||
{ "getChannelCount", l_lovrSoundGetChannelCount },
|
{ "getChannelCount", l_lovrSoundGetChannelCount },
|
||||||
{ "getSampleRate", l_lovrSoundGetSampleRate },
|
{ "getSampleRate", l_lovrSoundGetSampleRate },
|
||||||
{ "getFrameCount", l_lovrSoundGetFrameCount },
|
{ "getFrameCount", l_lovrSoundGetFrameCount },
|
||||||
|
{ "getCapacity", l_lovrSoundGetCapacity },
|
||||||
{ "getSampleCount", l_lovrSoundGetSampleCount },
|
{ "getSampleCount", l_lovrSoundGetSampleCount },
|
||||||
{ "getDuration", l_lovrSoundGetDuration },
|
{ "getDuration", l_lovrSoundGetDuration },
|
||||||
{ "isCompressed", l_lovrSoundIsCompressed },
|
{ "isCompressed", l_lovrSoundIsCompressed },
|
||||||
|
|
Loading…
Reference in New Issue