mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
move PCMStream to audio
This commit is contained in:
parent
fcbbdd649b
commit
5a65cbe071
3 changed files with 10 additions and 4 deletions
|
|
@ -131,7 +131,6 @@ void lua::init_state(State* L, StateType stateType) {
|
|||
newusertype<LuaHeightmap>(L);
|
||||
newusertype<LuaVoxelFragment>(L);
|
||||
newusertype<LuaCanvas>(L);
|
||||
newusertype<LuaPCMStream>(L);
|
||||
}
|
||||
|
||||
void lua::initialize(const EnginePaths& paths, const CoreParameters& params) {
|
||||
|
|
@ -186,5 +185,12 @@ State* lua::create_state(const EnginePaths& paths, StateType stateType) {
|
|||
}
|
||||
pop(L);
|
||||
}
|
||||
newusertype<LuaPCMStream>(L);
|
||||
if (getglobal(L, "audio")) {
|
||||
if (getglobal(L, "__vc_PCMStream")) {
|
||||
setfield(L, "PCMStream");
|
||||
}
|
||||
pop(L);
|
||||
}
|
||||
return L;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace lua {
|
|||
return TYPENAME;
|
||||
}
|
||||
static int createMetatable(lua::State*);
|
||||
inline static std::string TYPENAME = "PCMStream";
|
||||
inline static std::string TYPENAME = "__vc_PCMStream";
|
||||
private:
|
||||
std::shared_ptr<audio::MemoryPCMStream> stream;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue