Skip to content
Snippets Groups Projects
app_jack.c 28.2 KiB
Newer Older
  • Learn to ignore specific revisions
  • 	"on.  However, all arguments are optional when turning it off.\n"
    	"\n"
    	"   Valid modes are:\n"
    #if 0
    	/* XXX TODO */
    	"    spy -        Create a read-only audio hook.  Only an output jack port will\n"
    	"                 get created.\n"
    	"    whisper -    Create a write-only audio hook.  Only an input jack port will\n"
    	"                 get created.\n"
    #endif
    	"    manipulate - Create a read/write audio hook.  Both an input and an output\n"
    	"                 jack port will get created.  Audio from the channel will be\n"
    	"                 sent out the output port and will be replaced by the audio\n"
    	"                 coming in on the input port as it gets passed on.\n"
    	"\n"
    	"   Valid options are:\n"
    	COMMON_OPTIONS
    	"\n"
    	" Examples:\n"
    	"   To turn on the JACK_HOOK,\n"
    	"     Set(JACK_HOOK(manipulate,i(pure_data_0:input0)o(pure_data_0:output0))=on)\n"
    	"   To turn off the JACK_HOOK,\n"
    	"     Set(JACK_HOOK()=off)\n"
    	"",
    	.write = jack_hook_write,
    };
    
    static int unload_module(void)
    {
    	int res;
    
    	res = ast_unregister_application(jack_app);
    	res |= ast_custom_function_unregister(&jack_hook_function);
    
    	return res;
    }
    
    static int load_module(void)
    {
    
    	if (ast_register_application_xml(jack_app, jack_exec)) {
    
    	if (ast_custom_function_register(&jack_hook_function)) {
    		ast_unregister_application(jack_app);
    		return AST_MODULE_LOAD_DECLINE;
    	}
    
    AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "JACK Interface");