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)));
        }
Пример #2
0
        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)));
        }
Пример #3
0
        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);
            }));
        }