Example #1
0
 protected override bool ReleaseHandle()
 {
     WrapException.CheckForException((ref IntPtr e) => auxiliaryEffectSlot_destroyPointer(handle, ref e));
     SetHandleAsInvalid();
     handle = IntPtr.Zero;
     return(true);
 }
 public static void MakeThreadCurrent(Context ctx)
 {
     if (ctx == null)
     {
         WrapException.CheckForException((ref IntPtr e) => context_makeThreadCurrent(IntPtr.Zero, ref e));
     }
     else if (ctx.IsInvalid == false && ctx.IsClosed == false)
     {
         WrapException.CheckForException((ref IntPtr e) => context_makeThreadCurrent(ctx.DangerousGetHandle(), ref e));
     }
 }
Example #3
0
        public Source[] ToSources()
        {
            var    list = new List <Source>();
            UInt64 size = WrapException.CheckForException((ref IntPtr e) => sourceVector_getSize(handle, ref e));

            for (UInt64 i = 0; i < size; ++i)
            {
                list.Add(new Source(WrapException.CheckForException((ref IntPtr e) => sourceVector_getAt(handle, i, ref e)), true));
            }
            return(list.ToArray());
        }
 public void EndBatch()
 {
     WrapException.CheckForException((ref IntPtr e) => context_endBatch(handle, ref e));
 }
 public Device GetDevice()
 {
     return WrapException.CheckForException((ref IntPtr e) => context_getDevice(handle, ref e));
 }
 public static Context GetThreadCurrent()
 {
     return WrapException.CheckForException((ref IntPtr e) => context_getThreadCurrent(ref e));
 }
Example #7
0
 public void Resume()
 {
     WrapException.CheckForException((ref IntPtr e) => source_resume(handle, ref e));
 }
Example #8
0
 public void Pause()
 {
     WrapException.CheckForException((ref IntPtr e) => source_pause(handle, ref e));
 }
Example #9
0
 public void FadeOutToStop(float gain, UInt64 duration)
 {
     WrapException.CheckForException((ref IntPtr e) => source_fadeOutToStop(handle, gain, duration, ref e));
 }
Example #10
0
 public void Stop()
 {
     WrapException.CheckForException((ref IntPtr e) => source_stop(handle, ref e));
 }
Example #11
0
 public void Play(Buffer buffer)
 {
     WrapException.CheckForException((ref IntPtr e) => source_play(handle, buffer, ref e));
 }
Example #12
0
 public void Destroy()
 {
     WrapException.CheckForException((ref IntPtr e) => auxiliaryEffectSlot_destroy(handle, ref e));
 }
Example #13
0
 public void ApplyEffect(Effect effect)
 {
     WrapException.CheckForException((ref IntPtr e) => auxiliaryEffectSlot_applyEffect(handle, effect, ref e));
 }
Example #14
0
 public void Destroy()
 {
     WrapException.CheckForException((ref IntPtr e) => effect_destroy(handle, ref e));
 }
Example #15
0
 public void SetChorusProperties(EFXChorusProperties props)
 {
     WrapException.CheckForException((ref IntPtr e) => effect_setChorusProperties(handle, ref props, ref e));
 }