public static string[] GetMIMETypes(AudioFileType fileType) { IntPtr ptr; var size = (uint)sizeof(IntPtr); if (AudioFileGetGlobalInfo(AudioFileGlobalProperty.MIMETypesForType, sizeof(AudioFileType), ref fileType, ref size, out ptr) != 0) { return(null); } return(NSArray.ArrayFromHandleFunc(ptr, l => CFString.FetchString(l))); }
public static string?[]? GetExtensions(AudioFileType fileType) { IntPtr ptr; var size = (uint)sizeof(IntPtr); if (AudioFileGetGlobalInfo(AudioFileGlobalProperty.ExtensionsForType, sizeof(AudioFileType), ref fileType, ref size, out ptr) != 0) { return(null); } return(NSArray.ArrayFromHandleFunc(ptr, l => CFString.FromHandle(l))); }
public CTLine [] GetLines() { var cfArrayRef = CTFrameGetLines(handle); if (cfArrayRef == IntPtr.Zero) { return(new CTLine [0]); } return(NSArray.ArrayFromHandleFunc <CTLine> (cfArrayRef, (p) => { // We need to take a ref, since we dispose it later. return new CTLine(p, false); })); }