Re: MusicTrack timing and looping issues.
Re: MusicTrack timing and looping issues.
- Subject: Re: MusicTrack timing and looping issues.
- From: Aran Mulholland <email@hidden>
- Date: Thu, 04 Apr 2013 22:12:26 +1100
Hey Ben,
I've had the same issues. As far as I can tell the issues only happen when looping. What I am doing now is scheduling events in a pre-render callback. I am using the MusicTrack to store all of my note information and iterating it in the pre-render callback to see if there are any notes that need scheduling. I determine the current time by using MusicPlayerGetTime. I know that it is a no no to allocate on the render callback thread so every time the MusicTrack changes (a note gets added or removed) I allocate another iterator to use in the render callback thread. It's a long and convoluted path.
Other things I have tried was having a non-looping MusicTrack attached to an AUSampler. Then I had another thread that copied events from an other MusicTrack that contained my loop information. It meant having to manage the looping myself, but it worked. I abandoned this as I wasn't getting the latency requirements I wanted. (but I probably could have just tweaked it a bit)
Anyway, it would be nice if that MusicTrack played nicely with looping but.....
_______________________________________________
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