Merge pull request #688 from MihailRis/continue-audio

Continue audio
This commit is contained in:
MihailRis
2025-11-21 22:52:52 +03:00
committed by GitHub
13 changed files with 49 additions and 40 deletions
+1 -2
View File
@@ -27,8 +27,7 @@ LevelController::LevelController(
: settings(engine->getSettings()),
level(std::move(levelPtr)),
chunks(std::make_unique<ChunksController>(*level)),
playerTickClock(20, 3),
localPlayer(clientPlayer) {
playerTickClock(20, 3) {
level->events->listen(LevelEventType::CHUNK_PRESENT, [](auto, Chunk* chunk) {
scripting::on_chunk_present(*chunk, chunk->flags.loaded);
-1
View File
@@ -20,7 +20,6 @@ class LevelController {
std::unique_ptr<ChunksController> chunks;
util::Clock playerTickClock;
Player* localPlayer;
public:
LevelController(Engine* engine, std::unique_ptr<Level> level, Player* clientPlayer);
+3 -10
View File
@@ -431,12 +431,6 @@ static int l_audio_get_output_devices_names(lua::State* L) {
return 1;
}
static int l_audio_set_input_device(lua::State* L) {
auto device_name = lua::tostring(L, 1);
audio::set_input_device(device_name);
return 0;
}
static int l_audio_get_input_info(lua::State* L) {
auto device = audio::get_input_device();
if (device == nullptr) {
@@ -480,9 +474,8 @@ const luaL_Reg audiolib[] = {
{"count_speakers", lua::wrap<l_audio_count_speakers>},
{"count_streams", lua::wrap<l_audio_count_streams>},
{"__fetch_input", lua::wrap<l_audio_fetch_input>},
{"get_input_devices_names", lua::wrap<l_audio_get_input_devices_names>},
{"get_output_devices_names", lua::wrap<l_audio_get_output_devices_names>},
{"set_input_device", lua::wrap<l_audio_set_input_device>},
{"get_input_info", lua::wrap<l_audio_get_input_info>},
{"__get_input_devices_names", lua::wrap<l_audio_get_input_devices_names>},
{"__get_output_devices_names", lua::wrap<l_audio_get_output_devices_names>},
{"__get_input_info", lua::wrap<l_audio_get_input_info>},
{nullptr, nullptr}
};