MIDI player looping problems (21825100)

Running under beta 3.

Looping a simple MIDI file with MusicPlayer causes lockup.

If I set numberOfLoops to 0 in MusicTrackLoopInfo and playback the MIDI file, it will play once and then start locking up. It seems like it starts sending to itself and feeding back upon itself.


Bug Report: 21825100

Replies

Oct 5. The problem still exists and not solution.

Same here for our Songtive / Piano Companion applications. That affects all functionality which somehow related to loops and we temporary disable "loop" which is not solution for our users.

Just downloaded and tested with Xcode 7.1 Beta 3 (https://developer.apple.com/xcode/download/) and this issue is unfortunately still occurring.

I took my App off the store when iOS 9 got released to the public since it lost all functionality with this bug.

I removed my app from the store too.


Apple, please fix this bug 😢

Oct 12 the problem is still occuring with iOS 9.1 Beta 5.

come on Apple, you can fix this!

That means that it won't be fixed for 9.1 too... and this is really-really bad news for our apps too 😟

I can not make my users wait any more. So from a result, I tried other way for the loop.

1. Remove the properties for MusicTrackLoopInfo from all MusicTracks.

2. Add new MusicTrack for looping marker. (hereafter called "MarkerTrack")

3. Add new note message which it has only turning point marker. (ex: case musical measure 4/4, Mark a turning point in beat 5th.)

4. Set MarkerTrack as userEvent by MusicTrackNewMIDINoteEvent.

5. Set callback by MusicSequenceSetUserCallback.

6. You will be able to catch event your turning point. So, move the current playing position to 0.0 by using MusicPlayer/MusicPlayerSetTime!! (Set from the main thread !!)


It seems working fine.


I adopted to use this solution for my app BAR1 until Apple will fix this terrible problem. I hope to remove their codes from my source code, soon.

I hope this helps you.

Hi Doratsun - Thanks for posting this workaround for others to consider. I also saw a similar workaround posted on the Core Audio mailing list and have attempted this myself, but unfortunately with my app the timing of the music is the most important and the MIDI files themselves are not very long. Using this approach, at least in my app for my requirements, it caused a short delay which was very noticable, therefore this kind of work around doesn't work for my scenario.

As of today 10/20/2015 this build still exists in the latest build of Xcode and iOS9.1 beta.

OK guys, I have some sort of confirmation the bug should be fixed in the next release. But I have no idea when that would be. We are on 9.0.2 and I have no idea if they will be another release until 9.1.

I tried the work around with setting the playhead to 0.0 but had timing issues. The only way that worked for me was the fix I posted.


WOW, re-read posts and see that 9.1 has the bug. I hope it gets fixed before the release!!!!