Exemple #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));
     }
 }
Exemple #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));
 }
Exemple #7
0
 public void Resume()
 {
     WrapException.CheckForException((ref IntPtr e) => source_resume(handle, ref e));
 }
Exemple #8
0
 public void Pause()
 {
     WrapException.CheckForException((ref IntPtr e) => source_pause(handle, ref e));
 }
Exemple #9
0
 public void FadeOutToStop(float gain, UInt64 duration)
 {
     WrapException.CheckForException((ref IntPtr e) => source_fadeOutToStop(handle, gain, duration, ref e));
 }
Exemple #10
0
 public void Stop()
 {
     WrapException.CheckForException((ref IntPtr e) => source_stop(handle, ref e));
 }
Exemple #11
0
 public void Play(Buffer buffer)
 {
     WrapException.CheckForException((ref IntPtr e) => source_play(handle, buffer, ref e));
 }
Exemple #12
0
 public void Destroy()
 {
     WrapException.CheckForException((ref IntPtr e) => auxiliaryEffectSlot_destroy(handle, ref e));
 }
Exemple #13
0
 public void ApplyEffect(Effect effect)
 {
     WrapException.CheckForException((ref IntPtr e) => auxiliaryEffectSlot_applyEffect(handle, effect, ref e));
 }
Exemple #14
0
 public void Destroy()
 {
     WrapException.CheckForException((ref IntPtr e) => effect_destroy(handle, ref e));
 }
Exemple #15
0
 public void SetChorusProperties(EFXChorusProperties props)
 {
     WrapException.CheckForException((ref IntPtr e) => effect_setChorusProperties(handle, ref props, ref e));
 }