/[pidim]/src/pidim_common.c
ViewVC logotype

Diff of /src/pidim_common.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1 by ben, Wed Aug 25 18:17:40 2010 UTC revision 3 by ben, Thu Aug 26 01:09:50 2010 UTC
# Line 30  int alsa_open_output_port(snd_seq_t *han Line 30  int alsa_open_output_port(snd_seq_t *han
30                          SND_SEQ_PORT_TYPE_APPLICATION);                          SND_SEQ_PORT_TYPE_APPLICATION);
31  }  }
32    
33  void alsa_init_queue(snd_seq_t *handle)  /* init and return a queue */
34    int alsa_init_queue(snd_seq_t *handle, int seq_len)
35  {  {
36          int queue_id;          int queue_id;
37          queue_id = snd_seq_alloc_queue(handle);          queue_id = snd_seq_alloc_queue(handle);
38          snd_seq_set_client_pool_output(handle, 1);          snd_seq_set_client_pool_output(handle, (seq_len<<1) + 4);
39            return queue_id;
40  }  }
41    
42  void alsa_clear_queue(snd_seq_t *handle, int queue_id)  void alsa_clear_queue(snd_seq_t *handle, int queue_id)
43  {  {
44              snd_seq_remove_events_t *remove_ev;
45    
46      snd_seq_remove_events_malloc(&remove_ev);
47      snd_seq_remove_events_set_queue(remove_ev, queue_id);
48      snd_seq_remove_events_set_condition(remove_ev, SND_SEQ_REMOVE_OUTPUT | SND_SEQ_REMOVE_IGNORE_OFF);
49      snd_seq_remove_events(handle, remove_ev);
50      snd_seq_remove_events_free(remove_ev);
51  }  }
52    
53  /* get the file descriptor of the first MIDI input port */  /* get the file descriptor of the first MIDI input port */

Legend:
Removed from v.1  
changed lines
  Added in v.3

  ViewVC Help
Powered by ViewVC 1.1.26