ProxyAudioConsumerCallback.cs 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /* ----------------------------------------------------------------------------
  2. * This file was automatically generated by SWIG (http://www.swig.org).
  3. * Version 2.0.9
  4. *
  5. * Do not make changes to this file unless you know what you are doing--modify
  6. * the SWIG interface file instead.
  7. * ----------------------------------------------------------------------------- */
  8. namespace org.doubango.tinyWRAP {
  9. using System;
  10. using System.Runtime.InteropServices;
  11. public class ProxyAudioConsumerCallback : IDisposable {
  12. private HandleRef swigCPtr;
  13. protected bool swigCMemOwn;
  14. internal ProxyAudioConsumerCallback(IntPtr cPtr, bool cMemoryOwn) {
  15. swigCMemOwn = cMemoryOwn;
  16. swigCPtr = new HandleRef(this, cPtr);
  17. }
  18. internal static HandleRef getCPtr(ProxyAudioConsumerCallback obj) {
  19. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  20. }
  21. ~ProxyAudioConsumerCallback() {
  22. Dispose();
  23. }
  24. public virtual void Dispose() {
  25. lock(this) {
  26. if (swigCPtr.Handle != IntPtr.Zero) {
  27. if (swigCMemOwn) {
  28. swigCMemOwn = false;
  29. tinyWRAPPINVOKE.delete_ProxyAudioConsumerCallback(swigCPtr);
  30. }
  31. swigCPtr = new HandleRef(null, IntPtr.Zero);
  32. }
  33. GC.SuppressFinalize(this);
  34. }
  35. }
  36. public ProxyAudioConsumerCallback() : this(tinyWRAPPINVOKE.new_ProxyAudioConsumerCallback(), true) {
  37. SwigDirectorConnect();
  38. }
  39. public virtual int prepare(int ptime, int rate, int channels) {
  40. int ret = (SwigDerivedClassHasMethod("prepare", swigMethodTypes0) ? tinyWRAPPINVOKE.ProxyAudioConsumerCallback_prepareSwigExplicitProxyAudioConsumerCallback(swigCPtr, ptime, rate, channels) : tinyWRAPPINVOKE.ProxyAudioConsumerCallback_prepare(swigCPtr, ptime, rate, channels));
  41. return ret;
  42. }
  43. public virtual int start() {
  44. int ret = (SwigDerivedClassHasMethod("start", swigMethodTypes1) ? tinyWRAPPINVOKE.ProxyAudioConsumerCallback_startSwigExplicitProxyAudioConsumerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioConsumerCallback_start(swigCPtr));
  45. return ret;
  46. }
  47. public virtual int pause() {
  48. int ret = (SwigDerivedClassHasMethod("pause", swigMethodTypes2) ? tinyWRAPPINVOKE.ProxyAudioConsumerCallback_pauseSwigExplicitProxyAudioConsumerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioConsumerCallback_pause(swigCPtr));
  49. return ret;
  50. }
  51. public virtual int stop() {
  52. int ret = (SwigDerivedClassHasMethod("stop", swigMethodTypes3) ? tinyWRAPPINVOKE.ProxyAudioConsumerCallback_stopSwigExplicitProxyAudioConsumerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioConsumerCallback_stop(swigCPtr));
  53. return ret;
  54. }
  55. private void SwigDirectorConnect() {
  56. if (SwigDerivedClassHasMethod("prepare", swigMethodTypes0))
  57. swigDelegate0 = new SwigDelegateProxyAudioConsumerCallback_0(SwigDirectorprepare);
  58. if (SwigDerivedClassHasMethod("start", swigMethodTypes1))
  59. swigDelegate1 = new SwigDelegateProxyAudioConsumerCallback_1(SwigDirectorstart);
  60. if (SwigDerivedClassHasMethod("pause", swigMethodTypes2))
  61. swigDelegate2 = new SwigDelegateProxyAudioConsumerCallback_2(SwigDirectorpause);
  62. if (SwigDerivedClassHasMethod("stop", swigMethodTypes3))
  63. swigDelegate3 = new SwigDelegateProxyAudioConsumerCallback_3(SwigDirectorstop);
  64. tinyWRAPPINVOKE.ProxyAudioConsumerCallback_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3);
  65. }
  66. private bool SwigDerivedClassHasMethod(string methodName, Type[] methodTypes) {
  67. System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance, null, methodTypes, null);
  68. bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(ProxyAudioConsumerCallback));
  69. return hasDerivedMethod;
  70. }
  71. private int SwigDirectorprepare(int ptime, int rate, int channels) {
  72. return prepare(ptime, rate, channels);
  73. }
  74. private int SwigDirectorstart() {
  75. return start();
  76. }
  77. private int SwigDirectorpause() {
  78. return pause();
  79. }
  80. private int SwigDirectorstop() {
  81. return stop();
  82. }
  83. public delegate int SwigDelegateProxyAudioConsumerCallback_0(int ptime, int rate, int channels);
  84. public delegate int SwigDelegateProxyAudioConsumerCallback_1();
  85. public delegate int SwigDelegateProxyAudioConsumerCallback_2();
  86. public delegate int SwigDelegateProxyAudioConsumerCallback_3();
  87. private SwigDelegateProxyAudioConsumerCallback_0 swigDelegate0;
  88. private SwigDelegateProxyAudioConsumerCallback_1 swigDelegate1;
  89. private SwigDelegateProxyAudioConsumerCallback_2 swigDelegate2;
  90. private SwigDelegateProxyAudioConsumerCallback_3 swigDelegate3;
  91. private static Type[] swigMethodTypes0 = new Type[] { typeof(int), typeof(int), typeof(int) };
  92. private static Type[] swigMethodTypes1 = new Type[] { };
  93. private static Type[] swigMethodTypes2 = new Type[] { };
  94. private static Type[] swigMethodTypes3 = new Type[] { };
  95. }
  96. }