Hi everybody,
I’m trying to save a sequence to disk but it seems MusicSequenceFileCreate
doesn’t work for some reason. In the code below, there is no error thrown,
however, when doing a CAShow on the testSequence, I can see it's not the same
as the old sequence, all the tracks are missing. The only, let’s say odd,
thing about the tracks is that they have a user event with some data at
timestamp 0. Did anyone encountered issue this before? Any pointers on why this
is happening? Is is a bug?
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
NSUserDomainMask,
YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *midiPath = [documentsDirectory
stringByAppendingPathComponent:@"test.mid"];
NSURL* url = [[NSURL alloc] initFileURLWithPath:midiPath];
VRC(MusicSequenceFileCreate(sequence, (__bridge CFURLRef)url,
kMusicSequenceFile_MIDIType, kMusicSequenceFileFlags_EraseFile, 0));
MusicSequence testSequence;
VRC(NewMusicSequence(&testSequence));
VRC(MusicSequenceFileLoad(testSequence, (__bridge CFURLRef)url,
kMusicSequenceFile_MIDIType, 0));
Valentin Radu
codewisesystems.com <http://codewisesystems.com/>
cocoaexposed.com <http://cocoaexposed.com/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com
This email sent to [email protected]