From 66234b509ce98b26ae776f99ae1f4910282f1557 Mon Sep 17 00:00:00 2001 From: feos Date: Tue, 24 Sep 2019 23:46:50 +0300 Subject: callback after sound update has generated new samples --- src/emu/main.h | 1 + src/emu/sound.cpp | 3 +++ 2 files changed, 4 insertions(+) (limited to 'src/emu') diff --git a/src/emu/main.h b/src/emu/main.h index e5b0c845942..a62457a1c75 100644 --- a/src/emu/main.h +++ b/src/emu/main.h @@ -60,6 +60,7 @@ public: static void draw_user_interface(running_machine& machine); static void periodic_check(); static bool frame_hook(); + static void sound_hook(); static void layout_file_cb(util::xml::data_node const &layout); static bool standalone(); }; diff --git a/src/emu/sound.cpp b/src/emu/sound.cpp index 3ad10c6208d..805a6920fed 100644 --- a/src/emu/sound.cpp +++ b/src/emu/sound.cpp @@ -1152,6 +1152,9 @@ void sound_manager::update(void *ptr, int param) for (auto &stream : m_stream_list) stream->apply_sample_rate_changes(); + // notify that new samples have been generated + emulator_info::sound_hook(); + g_profiler.stop(); } -- cgit v1.2.3