ProxyAudioProducerCallback.cs 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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 ProxyAudioProducerCallback : IDisposable {
  12. private HandleRef swigCPtr;
  13. protected bool swigCMemOwn;
  14. internal ProxyAudioProducerCallback(IntPtr cPtr, bool cMemoryOwn) {
  15. swigCMemOwn = cMemoryOwn;
  16. swigCPtr = new HandleRef(this, cPtr);
  17. }
  18. internal static HandleRef getCPtr(ProxyAudioProducerCallback obj) {
  19. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  20. }
  21. ~ProxyAudioProducerCallback() {
  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_ProxyAudioProducerCallback(swigCPtr);
  30. }
  31. swigCPtr = new HandleRef(null, IntPtr.Zero);
  32. }
  33. GC.SuppressFinalize(this);
  34. }
  35. }
  36. public ProxyAudioProducerCallback() : this(tinyWRAPPINVOKE.new_ProxyAudioProducerCallback(), true) {
  37. SwigDirectorConnect();
  38. }
  39. public virtual int prepare(int ptime, int rate, int channels) {
  40. int ret = (SwigDerivedClassHasMethod("prepare", swigMethodTypes0) ? tinyWRAPPINVOKE.ProxyAudioProducerCallback_prepareSwigExplicitProxyAudioProducerCallback(swigCPtr, ptime, rate, channels) : tinyWRAPPINVOKE.ProxyAudioProducerCallback_prepare(swigCPtr, ptime, rate, channels));
  41. return ret;
  42. }
  43. public virtual int start() {
  44. int ret = (SwigDerivedClassHasMethod("start", swigMethodTypes1) ? tinyWRAPPINVOKE.ProxyAudioProducerCallback_startSwigExplicitProxyAudioProducerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioProducerCallback_start(swigCPtr));
  45. return ret;
  46. }
  47. public virtual int pause() {
  48. int ret = (SwigDerivedClassHasMethod("pause", swigMethodTypes2) ? tinyWRAPPINVOKE.ProxyAudioProducerCallback_pauseSwigExplicitProxyAudioProducerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioProducerCallback_pause(swigCPtr));
  49. return ret;
  50. }
  51. public virtual int stop() {
  52. int ret = (SwigDerivedClassHasMethod("stop", swigMethodTypes3) ? tinyWRAPPINVOKE.ProxyAudioProducerCallback_stopSwigExplicitProxyAudioProducerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioProducerCallback_stop(swigCPtr));
  53. return ret;
  54. }
  55. public virtual int fillPushBuffer() {
  56. int ret = (SwigDerivedClassHasMethod("fillPushBuffer", swigMethodTypes4) ? tinyWRAPPINVOKE.ProxyAudioProducerCallback_fillPushBufferSwigExplicitProxyAudioProducerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioProducerCallback_fillPushBuffer(swigCPtr));
  57. return ret;
  58. }
  59. private void SwigDirectorConnect() {
  60. if (SwigDerivedClassHasMethod("prepare", swigMethodTypes0))
  61. swigDelegate0 = new SwigDelegateProxyAudioProducerCallback_0(SwigDirectorprepare);
  62. if (SwigDerivedClassHasMethod("start", swigMethodTypes1))
  63. swigDelegate1 = new SwigDelegateProxyAudioProducerCallback_1(SwigDirectorstart);
  64. if (SwigDerivedClassHasMethod("pause", swigMethodTypes2))
  65. swigDelegate2 = new SwigDelegateProxyAudioProducerCallback_2(SwigDirectorpause);
  66. if (SwigDerivedClassHasMethod("stop", swigMethodTypes3))
  67. swigDelegate3 = new SwigDelegateProxyAudioProducerCallback_3(SwigDirectorstop);
  68. if (SwigDerivedClassHasMethod("fillPushBuffer", swigMethodTypes4))
  69. swigDelegate4 = new SwigDelegateProxyAudioProducerCallback_4(SwigDirectorfillPushBuffer);
  70. tinyWRAPPINVOKE.ProxyAudioProducerCallback_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4);
  71. }
  72. private bool SwigDerivedClassHasMethod(string methodName, Type[] methodTypes) {
  73. System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance, null, methodTypes, null);
  74. bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(ProxyAudioProducerCallback));
  75. return hasDerivedMethod;
  76. }
  77. private int SwigDirectorprepare(int ptime, int rate, int channels) {
  78. return prepare(ptime, rate, channels);
  79. }
  80. private int SwigDirectorstart() {
  81. return start();
  82. }
  83. private int SwigDirectorpause() {
  84. return pause();
  85. }
  86. private int SwigDirectorstop() {
  87. return stop();
  88. }
  89. private int SwigDirectorfillPushBuffer() {
  90. return fillPushBuffer();
  91. }
  92. public delegate int SwigDelegateProxyAudioProducerCallback_0(int ptime, int rate, int channels);
  93. public delegate int SwigDelegateProxyAudioProducerCallback_1();
  94. public delegate int SwigDelegateProxyAudioProducerCallback_2();
  95. public delegate int SwigDelegateProxyAudioProducerCallback_3();
  96. public delegate int SwigDelegateProxyAudioProducerCallback_4();
  97. private SwigDelegateProxyAudioProducerCallback_0 swigDelegate0;
  98. private SwigDelegateProxyAudioProducerCallback_1 swigDelegate1;
  99. private SwigDelegateProxyAudioProducerCallback_2 swigDelegate2;
  100. private SwigDelegateProxyAudioProducerCallback_3 swigDelegate3;
  101. private SwigDelegateProxyAudioProducerCallback_4 swigDelegate4;
  102. private static Type[] swigMethodTypes0 = new Type[] { typeof(int), typeof(int), typeof(int) };
  103. private static Type[] swigMethodTypes1 = new Type[] { };
  104. private static Type[] swigMethodTypes2 = new Type[] { };
  105. private static Type[] swigMethodTypes3 = new Type[] { };
  106. private static Type[] swigMethodTypes4 = new Type[] { };
  107. }
  108. }