Created
July 22, 2019 09:20
-
-
Save mandel-macaque/70fbccda22d9617227124f5a6d83e158 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Auto-generated from generator.cs, do not edit | |
// | |
// We keep references to objects, so warning 414 is expected | |
#pragma warning disable 414 | |
using System; | |
using System.Drawing; | |
using System.Diagnostics; | |
using System.ComponentModel; | |
using System.Threading.Tasks; | |
using System.Runtime.InteropServices; | |
using UIKit; | |
using GLKit; | |
using Metal; | |
using CoreML; | |
using MapKit; | |
using Photos; | |
using ModelIO; | |
using SceneKit; | |
using Contacts; | |
using Security; | |
using Messages; | |
using AudioUnit; | |
using CoreVideo; | |
using CoreMedia; | |
using QuickLook; | |
using CoreImage; | |
using SpriteKit; | |
using Foundation; | |
using CoreMotion; | |
using ObjCRuntime; | |
using AddressBook; | |
using MediaPlayer; | |
using GameplayKit; | |
using CoreGraphics; | |
using CoreLocation; | |
using AVFoundation; | |
using NewsstandKit; | |
using FileProvider; | |
using CoreAnimation; | |
using CoreFoundation; | |
namespace ObjCRuntime { | |
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] | |
static partial class Trampolines { | |
[DllImport ("/usr/lib/libobjc.dylib")] | |
static extern IntPtr _Block_copy (IntPtr ptr); | |
[UnmanagedFunctionPointerAttribute (CallingConvention.Cdecl)] | |
[UserDelegateType (typeof (global::GHIssue6626.AVAudioSourceNodeRenderBlock))] | |
internal delegate int DAVAudioSourceNodeRenderBlock (IntPtr block, bool isSilence, double timestamp, uint frameCount, ref IntPtr outputData); | |
// | |
// This class bridges native block invocations that call into C# | |
// | |
static internal class SDAVAudioSourceNodeRenderBlock { | |
static internal readonly DAVAudioSourceNodeRenderBlock Handler = Invoke; | |
[MonoPInvokeCallback (typeof (DAVAudioSourceNodeRenderBlock))] | |
static unsafe int Invoke (IntPtr block, bool isSilence, double timestamp, uint frameCount, ref IntPtr outputData) { | |
var descriptor = (BlockLiteral *) block; | |
var del = (global::GHIssue6626.AVAudioSourceNodeRenderBlock) (descriptor->Target); | |
var __xamarin_pref3 = Runtime.GetINativeObject<AudioToolbox.AudioBuffers> (outputData, false); | |
System.Int32 retval = del (isSilence, timestamp, frameCount, ref __xamarin_pref3); | |
outputData = __xamarin_pref3.GetHandle (); | |
return retval; | |
} | |
} /* class SDAVAudioSourceNodeRenderBlock */ | |
internal class NIDAVAudioSourceNodeRenderBlock { | |
IntPtr blockPtr; | |
DAVAudioSourceNodeRenderBlock invoker; | |
[Preserve (Conditional=true)] | |
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] | |
public unsafe NIDAVAudioSourceNodeRenderBlock (BlockLiteral *block) | |
{ | |
blockPtr = _Block_copy ((IntPtr) block); | |
invoker = block->GetDelegateForBlock<DAVAudioSourceNodeRenderBlock> (); | |
} | |
[Preserve (Conditional=true)] | |
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] | |
~NIDAVAudioSourceNodeRenderBlock () | |
{ | |
Runtime.ReleaseBlockOnMainThread (blockPtr); | |
} | |
[Preserve (Conditional=true)] | |
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] | |
public unsafe static global::GHIssue6626.AVAudioSourceNodeRenderBlock Create (IntPtr block) | |
{ | |
if (block == IntPtr.Zero) | |
return null; | |
if (BlockLiteral.IsManagedBlock (block)) { | |
var existing_delegate = ((BlockLiteral *) block)->Target as global::GHIssue6626.AVAudioSourceNodeRenderBlock; | |
if (existing_delegate != null) | |
return existing_delegate; | |
} | |
return new NIDAVAudioSourceNodeRenderBlock ((BlockLiteral *) block).Invoke; | |
} | |
[Preserve (Conditional=true)] | |
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] | |
unsafe int Invoke (bool isSilence, double timestamp, uint frameCount, ref global::AudioToolbox.AudioBuffers outputData) | |
{ | |
IntPtr outputDataValue = outputData == null ? IntPtr.Zero : outputData.Handle; | |
var ret = invoker (blockPtr, isSilence, timestamp, frameCount, ref outputDataValue); | |
if (outputDataValue != (outputData == null ? IntPtr.Zero : outputData.Handle)) | |
outputData = Runtime.GetINativeObject<AudioToolbox.AudioBuffers> (outputDataValue, false); | |
return ret; | |
} | |
} /* class NIDAVAudioSourceNodeRenderBlock */ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment