public MusicPlayerStatus Merge(double sourceStartTime, double sourceEndTime, MusicTrack targetTrack, double targetInsertTime) { if (targetTrack is null) { ObjCRuntime.ThrowHelper.ThrowArgumentNullException(nameof(targetTrack)); } return(MusicTrackMerge(Handle, sourceStartTime, sourceEndTime, targetTrack.Handle, targetInsertTime)); }
public MusicPlayerStatus Merge(double sourceStartTime, double sourceEndTime, MusicTrack targetTrack, double targetInsertTime) { if (targetTrack == null) { throw new ArgumentNullException("targetTrack"); } return(MusicTrackMerge(handle, sourceStartTime, sourceEndTime, targetTrack.Handle, targetInsertTime)); }
public MusicPlayerStatus GetTrackIndex(MusicTrack track, out int index) { if (track == null) { throw new ArgumentNullException("track"); } return(MusicSequenceGetTrackIndex(handle, track.Handle, out index)); }
public MusicPlayerStatus GetTrackIndex(MusicTrack track, out int index) { if (track is null) { ObjCRuntime.ThrowHelper.ThrowArgumentNullException(nameof(track)); } return(MusicSequenceGetTrackIndex(Handle, track.Handle, out index)); }
static void UserCallbackProxy(IntPtr inClientData, IntPtr inSequence, IntPtr inTrack, double inEventTime, IntPtr inEventData, double inStartSliceBeat, double inEndSliceBeat) { MusicSequenceUserCallback userCallback; lock (userCallbackHandles) userCallbackHandles.TryGetValue(inSequence, out userCallback); if (userCallback != null) { var userEventData = new MusicEventUserData(inEventData); var musicSequence = MusicSequence.Lookup(inSequence); var musicTrack = new MusicTrack(musicSequence, inTrack, false); userCallback(musicTrack, inEventTime, userEventData, inStartSliceBeat, inEndSliceBeat); } }
public int GetTrackIndex(MusicTrack track) { int idx; if (track == null) { throw new ArgumentNullException("track"); } var status = MusicSequenceGetTrackIndex(handle, track.Handle, out idx); if (status == MusicPlayerStatus.Success) { return(idx); } // that's never clear if the return value is the track or an error code return((int)status); }
public MusicPlayerStatus CopyInsert(double sourceStartTime, double sourceEndTime, MusicTrack targetTrack, double targetInsertTime) { if (targetTrack is null) { throw new ArgumentNullException(nameof(targetTrack)); } return(MusicTrackCopyInsert(Handle, sourceStartTime, sourceEndTime, targetTrack.Handle, targetInsertTime)); }