Re: MusicEventIterator & always returning kMusicEventType_Meta
Re: MusicEventIterator & always returning kMusicEventType_Meta
- Subject: Re: MusicEventIterator & always returning kMusicEventType_Meta
- From: Bill Stewart <email@hidden>
- Date: Thu, 15 May 2003 18:33:31 -0700
What track are you iterating over - perhaps it is the TempoTrack and it
only has meta events in it?
On Wednesday, May 14, 2003, at 07:03 AM, Matt Handley wrote:
Why does this code always switch to the kMusicEventType_Meta case?
Also, eventTime is always 0. Why is that?
Matt
while (hasCurrentEvent)
{
MusicEventIteratorGetEventInfo(iter,&eventTime,&eventType,NULL,NULL);
switch (eventType)
{
case kMusicEventType_Meta:
printf("Playing Meta message\n");
break;
case kMusicEventType_MIDINoteMessage:
printf("Playing Note message\n");
break;
case kMusicEventType_MIDIChannelMessage:
printf("Playing Channel message\n");
break;
case kMusicEventType_MIDIRawData:
printf("Playing Raw message\n");
break;
default:
printf("Playing some other message\n");
break;
}
if ((eventTime > time) || !iter)
break;
MusicEventIteratorNextEvent(iter);
MusicEventIteratorHasCurrentEvent(iter, &hasCurrentEvent);
}
_______________________________________________
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.
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
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.