MusicSequence and virtual sources...
MusicSequence and virtual sources...
- Subject: MusicSequence and virtual sources...
- From: Jason Hall <email@hidden>
- Date: Sun, 4 Apr 2004 23:49:09 -0700
I have been doing some basic testing of the AudioToolbox MusicPlayer,
MusicSequence and MusicTrack components. I've set up a simple tool to
load and SMF into a MusicSequence and played it successfully to my
hardware sampler. Works well and executes without error. Next, I used
MIDISourceCreate to publish an output from my tool. I viewed it
successfully in Reaktor as a possible source -- great. However, when I
call MusicSequenceSetMIDIEndpoint to that new endpoint and play, I get
nothing. Am I going to have to manually iterate through the track and
send the MIDI directly with MIDISend or something? Shouldn't the way it
is here work? Any ideas?
// some code ...
MIDIEndpointRef reaktor = NULL;
OSStatus sourcecreateerr = MIDISourceCreate(client,
CFSTR("MusicPlayerTest"), &reaktor);
if (sourcecreateerr)
NSLog(@"sourcecreateerr: %i", sourcecreateerr);
MusicPlayer player;
MusicSequence sequence;
// code to init player, sequence, then load SMF, etc...
OSStatus setEndErr = MusicSequenceSetMIDIEndpoint (sequence, reaktor);
if (setEndErr)
NSLog(@"setEndErr: %i", setEndErr);
OSStatus prerollerr = MusicPlayerPreroll(player);
if (prerollerr)
NSLog(@"prerollerr: %i", prerollerr);
MusicPlayerStart (player);
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.