From 63eccfc97497638b95929bcc9d2788c3653387e0 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Sun, 15 Feb 2009 04:04:53 +0000 Subject: [PATCH] swigall git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12026 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- .../languages/mod_managed/freeswitch_wrap.cxx | 160 +++++------------- src/mod/languages/mod_managed/managed/swig.cs | 81 ++------- 2 files changed, 61 insertions(+), 180 deletions(-) diff --git a/src/mod/languages/mod_managed/freeswitch_wrap.cxx b/src/mod/languages/mod_managed/freeswitch_wrap.cxx index be25c318f1..4bd655307a 100644 --- a/src/mod/languages/mod_managed/freeswitch_wrap.cxx +++ b/src/mod/languages/mod_managed/freeswitch_wrap.cxx @@ -19760,6 +19760,17 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_event_build_param_string(void * jarg } +SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_RESAMPLE_QUALITY_get() { + int jresult ; + int result; + + result = (int) 0; + + jresult = result; + return jresult; +} + + SWIGEXPORT void SWIGSTDCALL CSharp_switch_audio_resampler_t_resampler_set(void * jarg1, void * jarg2) { switch_audio_resampler_t *arg1 = (switch_audio_resampler_t *) 0 ; void *arg2 = (void *) 0 ; @@ -19875,87 +19886,12 @@ SWIGEXPORT double SWIGSTDCALL CSharp_switch_audio_resampler_t_rfactor_get(void * } -SWIGEXPORT void SWIGSTDCALL CSharp_switch_audio_resampler_t_from_set(void * jarg1, void * jarg2) { - switch_audio_resampler_t *arg1 = (switch_audio_resampler_t *) 0 ; - float *arg2 = (float *) 0 ; - - arg1 = (switch_audio_resampler_t *)jarg1; - arg2 = (float *)jarg2; - if (arg1) (arg1)->from = arg2; - -} - - -SWIGEXPORT void * SWIGSTDCALL CSharp_switch_audio_resampler_t_from_get(void * jarg1) { - void * jresult ; - switch_audio_resampler_t *arg1 = (switch_audio_resampler_t *) 0 ; - float *result = 0 ; - - arg1 = (switch_audio_resampler_t *)jarg1; - result = (float *) ((arg1)->from); - jresult = (void *)result; - return jresult; -} - - -SWIGEXPORT void SWIGSTDCALL CSharp_switch_audio_resampler_t_from_len_set(void * jarg1, int jarg2) { - switch_audio_resampler_t *arg1 = (switch_audio_resampler_t *) 0 ; - int arg2 ; - - arg1 = (switch_audio_resampler_t *)jarg1; - arg2 = (int)jarg2; - if (arg1) (arg1)->from_len = arg2; - -} - - -SWIGEXPORT int SWIGSTDCALL CSharp_switch_audio_resampler_t_from_len_get(void * jarg1) { - int jresult ; - switch_audio_resampler_t *arg1 = (switch_audio_resampler_t *) 0 ; - int result; - - arg1 = (switch_audio_resampler_t *)jarg1; - result = (int) ((arg1)->from_len); - jresult = result; - return jresult; -} - - -SWIGEXPORT void SWIGSTDCALL CSharp_switch_audio_resampler_t_from_size_set(void * jarg1, void * jarg2) { - switch_audio_resampler_t *arg1 = (switch_audio_resampler_t *) 0 ; - switch_size_t arg2 ; - switch_size_t *argp2 ; - - arg1 = (switch_audio_resampler_t *)jarg1; - argp2 = (switch_size_t *)jarg2; - if (!argp2) { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null switch_size_t", 0); - return ; - } - arg2 = *argp2; - if (arg1) (arg1)->from_size = arg2; - -} - - -SWIGEXPORT void * SWIGSTDCALL CSharp_switch_audio_resampler_t_from_size_get(void * jarg1) { - void * jresult ; - switch_audio_resampler_t *arg1 = (switch_audio_resampler_t *) 0 ; - switch_size_t result; - - arg1 = (switch_audio_resampler_t *)jarg1; - result = ((arg1)->from_size); - jresult = new switch_size_t((switch_size_t &)result); - return jresult; -} - - SWIGEXPORT void SWIGSTDCALL CSharp_switch_audio_resampler_t_to_set(void * jarg1, void * jarg2) { switch_audio_resampler_t *arg1 = (switch_audio_resampler_t *) 0 ; - float *arg2 = (float *) 0 ; + int16_t *arg2 = (int16_t *) 0 ; arg1 = (switch_audio_resampler_t *)jarg1; - arg2 = (float *)jarg2; + arg2 = (int16_t *)jarg2; if (arg1) (arg1)->to = arg2; } @@ -19964,10 +19900,10 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_audio_resampler_t_to_set(void * jarg1, SWIGEXPORT void * SWIGSTDCALL CSharp_switch_audio_resampler_t_to_get(void * jarg1) { void * jresult ; switch_audio_resampler_t *arg1 = (switch_audio_resampler_t *) 0 ; - float *result = 0 ; + int16_t *result = 0 ; arg1 = (switch_audio_resampler_t *)jarg1; - result = (float *) ((arg1)->to); + result = (int16_t *) ((arg1)->to); jresult = (void *)result; return jresult; } @@ -20038,35 +19974,27 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_switch_audio_resampler_t(void * jarg1) } -SWIGEXPORT int SWIGSTDCALL CSharp_switch_resample_perform_create(void * jarg1, int jarg2, void * jarg3, int jarg4, unsigned long jarg5, void * jarg6, char * jarg7, char * jarg8, int jarg9) { +SWIGEXPORT int SWIGSTDCALL CSharp_switch_resample_perform_create(void * jarg1, unsigned long jarg2, unsigned long jarg3, unsigned long jarg4, int jarg5, char * jarg6, char * jarg7, int jarg8) { int jresult ; switch_audio_resampler_t **arg1 = (switch_audio_resampler_t **) 0 ; - int arg2 ; - switch_size_t arg3 ; - int arg4 ; - uint32_t arg5 ; - switch_memory_pool_t *arg6 = (switch_memory_pool_t *) 0 ; + uint32_t arg2 ; + uint32_t arg3 ; + uint32_t arg4 ; + int arg5 ; + char *arg6 = (char *) 0 ; char *arg7 = (char *) 0 ; - char *arg8 = (char *) 0 ; - int arg9 ; + int arg8 ; switch_status_t result; - switch_size_t *argp3 ; arg1 = (switch_audio_resampler_t **)jarg1; - arg2 = (int)jarg2; - argp3 = (switch_size_t *)jarg3; - if (!argp3) { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null switch_size_t", 0); - return 0; - } - arg3 = *argp3; - arg4 = (int)jarg4; - arg5 = (uint32_t)jarg5; - arg6 = (switch_memory_pool_t *)jarg6; + arg2 = (uint32_t)jarg2; + arg3 = (uint32_t)jarg3; + arg4 = (uint32_t)jarg4; + arg5 = (int)jarg5; + arg6 = (char *)jarg6; arg7 = (char *)jarg7; - arg8 = (char *)jarg8; - arg9 = (int)jarg9; - result = (switch_status_t)switch_resample_perform_create(arg1,arg2,arg3,arg4,arg5,arg6,(char const *)arg7,(char const *)arg8,arg9); + arg8 = (int)jarg8; + result = (switch_status_t)switch_resample_perform_create(arg1,arg2,arg3,arg4,arg5,(char const *)arg6,(char const *)arg7,arg8); jresult = result; return jresult; } @@ -20080,23 +20008,17 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_resample_destroy(void * jarg1) { } -SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_resample_process(void * jarg1, void * jarg2, int jarg3, void * jarg4, unsigned long jarg5, int jarg6) { +SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_resample_process(void * jarg1, void * jarg2, unsigned long jarg3) { unsigned long jresult ; switch_audio_resampler_t *arg1 = (switch_audio_resampler_t *) 0 ; - float *arg2 = (float *) 0 ; - int arg3 ; - float *arg4 = (float *) 0 ; - uint32_t arg5 ; - int arg6 ; + int16_t *arg2 = (int16_t *) 0 ; + uint32_t arg3 ; uint32_t result; arg1 = (switch_audio_resampler_t *)jarg1; - arg2 = (float *)jarg2; - arg3 = (int)jarg3; - arg4 = (float *)jarg4; - arg5 = (uint32_t)jarg5; - arg6 = (int)jarg6; - result = (uint32_t)switch_resample_process(arg1,arg2,arg3,arg4,arg5,arg6); + arg2 = (int16_t *)jarg2; + arg3 = (uint32_t)jarg3; + result = (uint32_t)switch_resample_process(arg1,arg2,arg3); jresult = (unsigned long)result; return jresult; } @@ -20224,13 +20146,19 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_merge_sln(void * jarg1, unsig } -SWIGEXPORT void SWIGSTDCALL CSharp_switch_mux_channels(void * jarg1, unsigned long jarg2, unsigned long jarg3) { +SWIGEXPORT void SWIGSTDCALL CSharp_switch_mux_channels(void * jarg1, void * jarg2, unsigned long jarg3) { int16_t *arg1 = (int16_t *) 0 ; - uint32_t arg2 ; + switch_size_t arg2 ; uint32_t arg3 ; + switch_size_t *argp2 ; arg1 = (int16_t *)jarg1; - arg2 = (uint32_t)jarg2; + argp2 = (switch_size_t *)jarg2; + if (!argp2) { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null switch_size_t", 0); + return ; + } + arg2 = *argp2; arg3 = (uint32_t)jarg3; switch_mux_channels(arg1,arg2,arg3); } diff --git a/src/mod/languages/mod_managed/managed/swig.cs b/src/mod/languages/mod_managed/managed/swig.cs index 0e7cf2bc70..a717d72e9f 100644 --- a/src/mod/languages/mod_managed/managed/swig.cs +++ b/src/mod/languages/mod_managed/managed/swig.cs @@ -2871,9 +2871,8 @@ public class freeswitch { return ret; } - public static switch_status_t switch_resample_perform_create(SWIGTYPE_p_p_switch_audio_resampler_t new_resampler, int from_rate, SWIGTYPE_p_switch_size_t from_size, int to_rate, uint to_size, SWIGTYPE_p_apr_pool_t pool, string file, string func, int line) { - switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_resample_perform_create(SWIGTYPE_p_p_switch_audio_resampler_t.getCPtr(new_resampler), from_rate, SWIGTYPE_p_switch_size_t.getCPtr(from_size), to_rate, to_size, SWIGTYPE_p_apr_pool_t.getCPtr(pool), file, func, line); - if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); + public static switch_status_t switch_resample_perform_create(SWIGTYPE_p_p_switch_audio_resampler_t new_resampler, uint from_rate, uint to_rate, uint to_size, int quality, string file, string func, int line) { + switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_resample_perform_create(SWIGTYPE_p_p_switch_audio_resampler_t.getCPtr(new_resampler), from_rate, to_rate, to_size, quality, file, func, line); return ret; } @@ -2881,8 +2880,8 @@ public class freeswitch { freeswitchPINVOKE.switch_resample_destroy(SWIGTYPE_p_p_switch_audio_resampler_t.getCPtr(resampler)); } - public static uint switch_resample_process(switch_audio_resampler_t resampler, SWIGTYPE_p_float src, int srclen, SWIGTYPE_p_float dst, uint dstlen, int last) { - uint ret = freeswitchPINVOKE.switch_resample_process(switch_audio_resampler_t.getCPtr(resampler), SWIGTYPE_p_float.getCPtr(src), srclen, SWIGTYPE_p_float.getCPtr(dst), dstlen, last); + public static uint switch_resample_process(switch_audio_resampler_t resampler, SWIGTYPE_p_short src, uint srclen) { + uint ret = freeswitchPINVOKE.switch_resample_process(switch_audio_resampler_t.getCPtr(resampler), SWIGTYPE_p_short.getCPtr(src), srclen); return ret; } @@ -2924,8 +2923,9 @@ public class freeswitch { return ret; } - public static void switch_mux_channels(SWIGTYPE_p_short data, uint samples, uint channels) { - freeswitchPINVOKE.switch_mux_channels(SWIGTYPE_p_short.getCPtr(data), samples, channels); + public static void switch_mux_channels(SWIGTYPE_p_short data, SWIGTYPE_p_switch_size_t samples, uint channels) { + freeswitchPINVOKE.switch_mux_channels(SWIGTYPE_p_short.getCPtr(data), SWIGTYPE_p_switch_size_t.getCPtr(samples), channels); + if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); } public static switch_status_t switch_ivr_deactivate_unicast(SWIGTYPE_p_switch_core_session session) { @@ -4222,6 +4222,7 @@ public class freeswitch { public static readonly int SWITCH_CMD_CHUNK_LEN = freeswitchPINVOKE.SWITCH_CMD_CHUNK_LEN_get(); public static readonly int SWITCH_SMAX = freeswitchPINVOKE.SWITCH_SMAX_get(); public static readonly int SWITCH_SMIN = freeswitchPINVOKE.SWITCH_SMIN_get(); + public static readonly int SWITCH_RESAMPLE_QUALITY = freeswitchPINVOKE.SWITCH_RESAMPLE_QUALITY_get(); public static readonly int SWITCH_RTP_MAX_BUF_LEN = freeswitchPINVOKE.SWITCH_RTP_MAX_BUF_LEN_get(); public static readonly int SWITCH_RTP_MAX_CRYPTO_LEN = freeswitchPINVOKE.SWITCH_RTP_MAX_CRYPTO_LEN_get(); public static readonly int SWITCH_RTP_KEY_LEN = freeswitchPINVOKE.SWITCH_RTP_KEY_LEN_get(); @@ -9113,6 +9114,9 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_event_build_param_string")] public static extern string switch_event_build_param_string(HandleRef jarg1, string jarg2, HandleRef jarg3); + [DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RESAMPLE_QUALITY_get")] + public static extern int SWITCH_RESAMPLE_QUALITY_get(); + [DllImport("mod_managed", EntryPoint="CSharp_switch_audio_resampler_t_resampler_set")] public static extern void switch_audio_resampler_t_resampler_set(HandleRef jarg1, HandleRef jarg2); @@ -9143,24 +9147,6 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_audio_resampler_t_rfactor_get")] public static extern double switch_audio_resampler_t_rfactor_get(HandleRef jarg1); - [DllImport("mod_managed", EntryPoint="CSharp_switch_audio_resampler_t_from_set")] - public static extern void switch_audio_resampler_t_from_set(HandleRef jarg1, HandleRef jarg2); - - [DllImport("mod_managed", EntryPoint="CSharp_switch_audio_resampler_t_from_get")] - public static extern IntPtr switch_audio_resampler_t_from_get(HandleRef jarg1); - - [DllImport("mod_managed", EntryPoint="CSharp_switch_audio_resampler_t_from_len_set")] - public static extern void switch_audio_resampler_t_from_len_set(HandleRef jarg1, int jarg2); - - [DllImport("mod_managed", EntryPoint="CSharp_switch_audio_resampler_t_from_len_get")] - public static extern int switch_audio_resampler_t_from_len_get(HandleRef jarg1); - - [DllImport("mod_managed", EntryPoint="CSharp_switch_audio_resampler_t_from_size_set")] - public static extern void switch_audio_resampler_t_from_size_set(HandleRef jarg1, HandleRef jarg2); - - [DllImport("mod_managed", EntryPoint="CSharp_switch_audio_resampler_t_from_size_get")] - public static extern IntPtr switch_audio_resampler_t_from_size_get(HandleRef jarg1); - [DllImport("mod_managed", EntryPoint="CSharp_switch_audio_resampler_t_to_set")] public static extern void switch_audio_resampler_t_to_set(HandleRef jarg1, HandleRef jarg2); @@ -9186,13 +9172,13 @@ class freeswitchPINVOKE { public static extern void delete_switch_audio_resampler_t(HandleRef jarg1); [DllImport("mod_managed", EntryPoint="CSharp_switch_resample_perform_create")] - public static extern int switch_resample_perform_create(HandleRef jarg1, int jarg2, HandleRef jarg3, int jarg4, uint jarg5, HandleRef jarg6, string jarg7, string jarg8, int jarg9); + public static extern int switch_resample_perform_create(HandleRef jarg1, uint jarg2, uint jarg3, uint jarg4, int jarg5, string jarg6, string jarg7, int jarg8); [DllImport("mod_managed", EntryPoint="CSharp_switch_resample_destroy")] public static extern void switch_resample_destroy(HandleRef jarg1); [DllImport("mod_managed", EntryPoint="CSharp_switch_resample_process")] - public static extern uint switch_resample_process(HandleRef jarg1, HandleRef jarg2, int jarg3, HandleRef jarg4, uint jarg5, int jarg6); + public static extern uint switch_resample_process(HandleRef jarg1, HandleRef jarg2, uint jarg3); [DllImport("mod_managed", EntryPoint="CSharp_switch_float_to_short")] public static extern IntPtr switch_float_to_short(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3); @@ -9219,7 +9205,7 @@ class freeswitchPINVOKE { public static extern uint switch_merge_sln(HandleRef jarg1, uint jarg2, HandleRef jarg3, uint jarg4); [DllImport("mod_managed", EntryPoint="CSharp_switch_mux_channels")] - public static extern void switch_mux_channels(HandleRef jarg1, uint jarg2, uint jarg3); + public static extern void switch_mux_channels(HandleRef jarg1, HandleRef jarg2, uint jarg3); [DllImport("mod_managed", EntryPoint="CSharp_switch_unicast_conninfo_session_set")] public static extern void switch_unicast_conninfo_session_set(HandleRef jarg1, HandleRef jarg2); @@ -16274,46 +16260,13 @@ public class switch_audio_resampler_t : IDisposable { } } - public SWIGTYPE_p_float from { + public SWIGTYPE_p_short to { set { - freeswitchPINVOKE.switch_audio_resampler_t_from_set(swigCPtr, SWIGTYPE_p_float.getCPtr(value)); - } - get { - IntPtr cPtr = freeswitchPINVOKE.switch_audio_resampler_t_from_get(swigCPtr); - SWIGTYPE_p_float ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false); - return ret; - } - } - - public int from_len { - set { - freeswitchPINVOKE.switch_audio_resampler_t_from_len_set(swigCPtr, value); - } - get { - int ret = freeswitchPINVOKE.switch_audio_resampler_t_from_len_get(swigCPtr); - return ret; - } - } - - public SWIGTYPE_p_switch_size_t from_size { - set { - freeswitchPINVOKE.switch_audio_resampler_t_from_size_set(swigCPtr, SWIGTYPE_p_switch_size_t.getCPtr(value)); - if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); - } - get { - SWIGTYPE_p_switch_size_t ret = new SWIGTYPE_p_switch_size_t(freeswitchPINVOKE.switch_audio_resampler_t_from_size_get(swigCPtr), true); - if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public SWIGTYPE_p_float to { - set { - freeswitchPINVOKE.switch_audio_resampler_t_to_set(swigCPtr, SWIGTYPE_p_float.getCPtr(value)); + freeswitchPINVOKE.switch_audio_resampler_t_to_set(swigCPtr, SWIGTYPE_p_short.getCPtr(value)); } get { IntPtr cPtr = freeswitchPINVOKE.switch_audio_resampler_t_to_get(swigCPtr); - SWIGTYPE_p_float ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false); + SWIGTYPE_p_short ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_short(cPtr, false); return ret; } }