SoundData:getBlob()

This commit is contained in:
Nevyn Bengtsson 2020-01-19 17:26:24 +01:00
parent 790629bc3e
commit 7107ecd235
1 changed files with 8 additions and 0 deletions

View File

@ -52,6 +52,13 @@ static int l_lovrSoundDataGetPointer(lua_State* L) {
return 1;
}
static int l_lovrSoundDataGetBlob(lua_State* L) {
SoundData* soundData = luax_checktype(L, 1, SoundData);
Blob* blob = soundData->blob;
luax_pushtype(L, Blob, blob);
return 1;
}
const luaL_Reg lovrSoundData[] = {
{ "getBitDepth", l_lovrSoundDataGetBitDepth },
{ "getChannelCount", l_lovrSoundDataGetChannelCount },
@ -61,5 +68,6 @@ const luaL_Reg lovrSoundData[] = {
{ "getSampleRate", l_lovrSoundDataGetSampleRate },
{ "setSample", l_lovrSoundDataSetSample },
{ "getPointer", l_lovrSoundDataGetPointer },
{ "getBlob", l_lovrSoundDataGetBlob },
{ NULL, NULL }
};