loops - iOS9 Beta and MusicTrackLoopInfo -


has been able loop midi file without problems on ios9 beta? try loop setting numberofloops 0 in musictrackloopinfo, locks app sending random midi player. i've reported it, wondering if has found work around. same code works under other ios versions.

musictrackloopinfo loopinfo; loopinfo.loopduration = looplength; loopinfo.numberofloops = 0; 

ok heard ios9 ship bug in it. terrible.

here work around.

don't set numberofloops @ all, or set numberofloops = 1; // means loop once make variable (i.e. myvariabletokeeptrackofaddedcopies) keeps track of number of times perform following:

in midireadproc @ point before track has finished playing, following:

// copy track - doubling length musictrack thetrack=nil; musictrackgetproperty(thetrack, ksequencetrackproperty_tracklength,         &tracklen, &tracklenlen); tracklen = 4.0; //<-- real track length musictrackcopyinsert(thetrack, 0, tracklen, thetrack, 0); myvariabletokeeptrackofaddedcopies++; 

so track twice long before ends , track continue. work same looping except taking more memory since making track length longer after each iteration.

when stop sequence/track, cut track original size.

musictrackcut(thetrack, 4.0, 4.0 +     (4.0*myvariabletokeeptrackofaddedcopies)); musictrackgetproperty(thetrack, ksequencetrackproperty_tracklength,     &tracklen, &tracklenlen); 

irritating, works. verified on ios9 beta 5. hope helps.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -