diff options
author | waker <wakeroid@gmail.com> | 2011-04-14 20:50:40 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-04-14 20:50:40 +0200 |
commit | 4e3bdbb0bc8649208400b9eb63751db15bc9bcda (patch) | |
tree | 3bfc597a6255a652ce774558bda4bf65c6b6252a /plugins/sndfile | |
parent | a0116d4496107e368b791d86295834c6e844a6e8 (diff) |
new event passing system
Diffstat (limited to 'plugins/sndfile')
-rw-r--r-- | plugins/sndfile/sndfile.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/sndfile/sndfile.c b/plugins/sndfile/sndfile.c index 3af4616f..bc7eaf1a 100644 --- a/plugins/sndfile/sndfile.c +++ b/plugins/sndfile/sndfile.c @@ -411,23 +411,24 @@ sndfile_init_exts (void) { exts[n] = NULL; } - static int -sndfile_on_configchanged (DB_event_t *ev, uintptr_t data) { - sndfile_init_exts (); +sndfile_message (uint32_t id, uintptr_t ctx, uint32_t p1, uint32_t p2) { + switch (id) { + case DB_EV_CONFIGCHANGED: + sndfile_init_exts (); + break; + } return 0; } static int sndfile_start (void) { sndfile_init_exts (); - deadbeef->ev_subscribe (DB_PLUGIN (&plugin), DB_EV_CONFIGCHANGED, DB_CALLBACK (sndfile_on_configchanged), 0); return 0; } static int sndfile_stop (void) { - deadbeef->ev_unsubscribe (DB_PLUGIN (&plugin), DB_EV_CONFIGCHANGED, DB_CALLBACK (sndfile_on_configchanged), 0); for (int i = 0; exts[i]; i++) { free (exts[i]); } @@ -479,6 +480,7 @@ static DB_decoder_t plugin = { .plugin.start = sndfile_start, .plugin.stop = sndfile_stop, .plugin.configdialog = settings_dlg, + .plugin.message = sndfile_message, }; DB_plugin_t * |