// There are two APIs for getting all of the events. // - The "raw" pointers from the linked list // - The EnumeratorCurrentEvents wrapper //#define USE_RAW_EVENT_ENUMERATION #if USE_RAW_EVENT_ENUMERATION unsafe void PerformAllSimultaneousEvents (nint now, AURenderEvent** theEvent) { do { HandleOneEvent (**theEvent); *theEvent = (*theEvent)->Head.UnsafeNext; } while (*theEvent != null && ((*theEvent)->Head.EventSampleTime == now)); }
void HandleOneEvent (AURenderEvent theEvent) { switch (theEvent.Head.EventType) { case AURenderEventType.Parameter: case AURenderEventType.ParameterRamp: AUParameterEvent paramEvent = theEvent.Parameter; StartRamp (paramEvent.ParameterAddress, paramEvent.Value, (int)paramEvent.RampDurationSampleFrames); break; case AURenderEventType.Midi: throw new NotImplementedException (); } }
void HandleOneEvent(AURenderEvent theEvent) { switch (theEvent.Head.EventType) { case AURenderEventType.Parameter: case AURenderEventType.ParameterRamp: AUParameterEvent paramEvent = theEvent.Parameter; StartRamp(paramEvent.ParameterAddress, paramEvent.Value, (int)paramEvent.RampDurationSampleFrames); break; case AURenderEventType.Midi: throw new NotImplementedException(); } }