MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / luaArrayTomemoryBlock

Function luaArrayTomemoryBlock

Source/Core/CtrlrUtilities.cpp:958–971  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

956}
957
958const MemoryBlock luaArrayTomemoryBlock(const CtrlrLuaObjectWrapper &luaArray)
959{
960 MemoryBlock bl;
961 if (luaArray.getObject().is_valid() && luabind::type(luaArray.getObject()) == LUA_TTABLE)
962 {
963 for (luabind::iterator i(luaArray.getObject()), end; i != end; i++)
964 {
965 const uint8 v = luabind::object_cast<uint8>(*i);
966 bl.append(&v, 1);
967 }
968 }
969
970 return (bl);
971}
972
973Array<float> luaArrayToFloat(const CtrlrLuaObjectWrapper&luaArray)
974{

Callers 3

LMemoryBlockMethod · 0.85
fromLuaTableMethod · 0.85
CtrlrMidiMessageMethod · 0.85

Calls 4

typeFunction · 0.85
is_validMethod · 0.45
getObjectMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected