From cc37e9fe2d847f70f96aa13d0bd6c0e3c4cc2ef8 Mon Sep 17 00:00:00 2001 From: Brian West Date: Fri, 22 Aug 2008 20:48:40 +0000 Subject: [PATCH] fix mod_soundtouch git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9357 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- .../mod_soundtouch/mod_soundtouch.cpp | 31 ++++--------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/src/mod/applications/mod_soundtouch/mod_soundtouch.cpp b/src/mod/applications/mod_soundtouch/mod_soundtouch.cpp index b1076d00ab..6215aa0a7a 100644 --- a/src/mod/applications/mod_soundtouch/mod_soundtouch.cpp +++ b/src/mod/applications/mod_soundtouch/mod_soundtouch.cpp @@ -304,35 +304,16 @@ SWITCH_STANDARD_APP(soundtouch_start_function) switch_channel_set_private(channel, "_soundtouch_", bug); } -static switch_application_interface_t soundtouch_application_interface = { - /*.interface_name */ "soundtouch", - /*.application_function */ soundtouch_start_function, - /* long_desc */ "Alter the audio stream", - /* short_desc */ "Alter the audio stream", - /* syntax */ "[send|recv] [-]s [.]p", - /* flags */ SAF_NONE, - /* next */ - -}; - -static switch_loadable_module_interface_t soundtouch_module_interface = { - /*.module_name */ modname, - /*.endpoint_interface */ NULL, - /*.timer_interface */ NULL, - /*.dialplan_interface */ NULL, - /*.codec_interface */ NULL, - /*.application_interface */ &soundtouch_application_interface, - /*.api_interface */ NULL, - /*.file_interface */ NULL, - /*.speech_interface */ NULL, - /*.directory_interface */ NULL -}; - SWITCH_MODULE_LOAD_FUNCTION(mod_soundtouch_load) { + switch_application_interface_t *app_interface; + /* connect my internal structure to the blank pointer passed to me */ - *module_interface = &soundtouch_module_interface; + *module_interface = switch_loadable_module_create_module_interface(pool, modname); + + SWITCH_ADD_APP(app_interface, "soundtouch", "Alter the audio stream", "Alter the audio stream", + soundtouch_start_function, "[send|recv] [-]s [.]p", SAF_NONE); /* indicate that the module should continue to be loaded */ return SWITCH_STATUS_SUCCESS;