Beispiel #1
0
        public MusicPlayerStatus AddMetaEvent(double timestamp, MidiMetaEvent metaEvent)
        {
            if (metaEvent == null)
            {
                throw new ArgumentNullException("metaEvent");
            }

            var ptr = metaEvent.ToUnmanaged();
            var ret = MusicTrackNewMetaEvent(handle, timestamp, ptr);

            Marshal.FreeHGlobal(ptr);
            return(ret);
        }
Beispiel #2
0
        public MusicPlayerStatus AddMetaEvent(double timestamp, MidiMetaEvent metaEvent)
        {
            if (metaEvent is null)
            {
                ObjCRuntime.ThrowHelper.ThrowArgumentNullException(nameof(metaEvent));
            }

            var ptr = metaEvent.ToUnmanaged();
            var ret = MusicTrackNewMetaEvent(Handle, timestamp, ptr);

            Marshal.FreeHGlobal(ptr);
            return(ret);
        }