예제 #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);
        }
예제 #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);
        }