summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
authorGravatarGravatar R. Belmont <rb6502@users.noreply.github.com>2019-09-25 17:01:44 -0400
committerGravatarGravatar GitHub <noreply@github.com>2019-09-25 17:01:44 -0400
commit133cbc344e2c03742d194fb7d5a6e00e1b1e4b19 (patch)
tree27b2d7f1615695a504f1d633c0316574f40bef6f /src/emu
parent21ad25e4c4d35fd629e75f8bce01685ce27d0d41 (diff)
parent66234b509ce98b26ae776f99ae1f4910282f1557 (diff)
Merge pull request #5683 from vadosnaprimer/sound_callback
Lua callback after sound update has generated new samples
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/main.h1
-rw-r--r--src/emu/sound.cpp3
2 files changed, 4 insertions, 0 deletions
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();
}