Re: MusicSequenceFileLoad Returns -1 on iOS10 (AudioToolbox/MusicPlayer)
Re: MusicSequenceFileLoad Returns -1 on iOS10 (AudioToolbox/MusicPlayer)
- Subject: Re: MusicSequenceFileLoad Returns -1 on iOS10 (AudioToolbox/MusicPlayer)
- From: down to this <email@hidden>
- Date: Fri, 14 Oct 2016 07:46:14 +0900
Just wanted to follow up regarding this. As per the work-around the Douglas Scott suggested below, I've implemented this successfully in my app and it is working without issues.
For those who are unaware (as I was), the 'errno' value can simply be set directly. By updating the "errno" value to 0 after a failed call, subsequent calls to 'MusicSequenceFileLoad' generate a successful response. Therefore, I've amended my code as follows:
OSStatus statusOfInitialAttempt = CheckError(MusicSequenceFileLoad(self.masterMidiMusicSequence, (__bridge CFURLRef)midiFileURL, 0, 0), "MusicSequenceFileLoad");
if (statusOfInitialAttempt == -1) {
errno = 0;
OSStatus statusOfSecondAttempt = CheckErrorAndReturnOnFailure(MusicSequenceFileLoad(self.masterMidiMusicSequence, (__bridge CFURLRef)midiFileURL, 0, 0), "MusicSequenceFileLoad");
if (statusOfSecondAttempt == -1) {
// Handle error case
}
}
_______________________________________________
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