/** call-seq: condition = flags Set the removal condition bits. These bits must be used in conjunction with other arguments and specify which values are checked. *IMPORTANT*: the other setters do *not* set implicit flags. Parameters: [flags] a combination of: - +SND_SEQ_REMOVE_INPUT+, all input queues will be flushed (not a restriction) - +SND_SEQ_REMOVE_OUTPUT+, all output queues will be flushed ("") - +SND_SEQ_REMOVE_DEST+, 'with this destination', use +dest=+ - +SND_SEQ_REMOVE_DEST_CHANNEL+ - +SND_SEQ_REMOVE_TIME_BEFORE+ - +SND_SEQ_REMOVE_TIME_AFTER+ - +SND_SEQ_REMOVE_TIME_TICK+, to indicate time given is in ticks - +SND_SEQ_REMOVE_EVENT_TYPE+ - +SND_SEQ_REMOVE_TAG_MATCH+, with identical tag. - +SND_SEQ_REMOVE_IGNORE_OFF+, do not flush any +OFF+ events (as in NOTE_OFF etc.) Because that could make things worse. */ static VALUE wrap_snd_seq_remove_events_set_condition(VALUE v_rmp, VALUE v_flags) { snd_seq_remove_events_t *rmp; Data_Get_Struct(v_rmp, snd_seq_remove_events_t, rmp); snd_seq_remove_events_set_condition(rmp, NUM2UINT(v_flags)); return Qnil; }
void midibus::remove_queued_on_events (int tag) { automutex locker(m_mutex); snd_seq_remove_events_t * remove_events; snd_seq_remove_events_malloc(&remove_events); snd_seq_remove_events_set_condition ( remove_events, SND_SEQ_REMOVE_OUTPUT | SND_SEQ_REMOVE_TAG_MATCH | SND_SEQ_REMOVE_IGNORE_OFF ); snd_seq_remove_events_set_tag(remove_events, tag); snd_seq_remove_events(m_seq, remove_events); snd_seq_remove_events_free(remove_events); }