Editing a looping MusicTrack as it plays
Editing a looping MusicTrack as it plays
- Subject: Editing a looping MusicTrack as it plays
- From: "Dave O'Neill" <email@hidden>
- Date: Wed, 22 May 2013 15:58:14 -0700
I found a workaround to the issue of the MusicPlayer stopping when editing close to loop point of MusicTrack while playing. I add an arbitrary user event exactly at the loopPoint. For instance, the loop point of my track is at 8, so before starting the track I add this user event: typedef struct{ UInt32 length; int fillerInt; }BogusStruct;
BogusStruct bogusStruct = {0}; bogusStruct.length = sizeof(BogusStruct);
MusicTrackNewUserEvent(_musicTrack, 8,(MusicEventUserData *)&bogusStruct);
I think you can add any event, I just chose this because it never gets used if you don,t specify a callback using MusicSequenceSetUserCallback.
Dave |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden