~n3npq/lsb/t2c-alsa-tests

« back to all changes in this revision

Viewing changes to spec/group___m_i_d_i___event.html

  • Committer: Jeff Licquia
  • Date: 2009-12-01 02:17:33 UTC
  • Revision ID: jeff@licquia.org-20091201021733-3wwc7cdytdzz7hwo
Initial version.

This contains the spec, as mirrored from the ALSA site, and as run
through KompoZer (so its gratuitous format changes are already there).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
2
<html><head>
 
3
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>ALSA project - the C library reference: Sequencer event &lt;-&gt; MIDI byte stream coder</title>
 
4
 
 
5
<link href="doxygen.css" rel="stylesheet" type="text/css">
 
6
<link href="tabs.css" rel="stylesheet" type="text/css"></head><body>
 
7
<!-- Generated by Doxygen 1.5.0 -->
 
8
<div class="tabs">
 
9
  <ul>
 
10
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
 
11
    <li><a href="modules.html"><span>Modules</span></a></li>
 
12
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
 
13
    <li><a href="files.html"><span>Files</span></a></li>
 
14
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
 
15
    <li><a href="examples.html"><span>Examples</span></a></li>
 
16
  </ul></div>
 
17
<h1>Sequencer event &lt;-&gt; MIDI byte stream coder<br>
 
18
<small>
 
19
[<a class="el" href="group___sequencer.html">MIDI Sequencer</a>]</small>
 
20
</h1><table border="0" cellpadding="0" cellspacing="0">
 
21
<tbody><tr><td><br>
 
22
</td></tr>
 
23
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
 
24
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">typedef snd_midi_event&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___m_i_d_i___event.html#gdd832d6254922704a5460574b3f206a1">snd_midi_event_t</a></td></tr>
 
25
 
 
26
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
 
27
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___m_i_d_i___event.html#g8a9a7658d59324aaeda36584086ae2ba">snd_midi_event_new</a> (size_t bufsize, <a class="el" href="group___m_i_d_i___event.html#gdd832d6254922704a5460574b3f206a1">snd_midi_event_t</a> **rdev)</td></tr>
 
28
 
 
29
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a MIDI event parser.  <a href="#g8a9a7658d59324aaeda36584086ae2ba"></a><br></td></tr>
 
30
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___m_i_d_i___event.html#gab1ad2aa43924fd0da8b98034d181da2">snd_midi_event_resize_buffer</a> (<a class="el" href="group___m_i_d_i___event.html#gdd832d6254922704a5460574b3f206a1">snd_midi_event_t</a> *dev, size_t bufsize)</td></tr>
 
31
 
 
32
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resizes the MIDI message encoding buffer.  <a href="#gab1ad2aa43924fd0da8b98034d181da2"></a><br></td></tr>
 
33
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___m_i_d_i___event.html#g060373584caf402f3a53082a8068ce5a">snd_midi_event_free</a> (<a class="el" href="group___m_i_d_i___event.html#gdd832d6254922704a5460574b3f206a1">snd_midi_event_t</a> *dev)</td></tr>
 
34
 
 
35
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Frees a MIDI event parser.  <a href="#g060373584caf402f3a53082a8068ce5a"></a><br></td></tr>
 
36
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___m_i_d_i___event.html#gc25407ac8f5f51d2dac7fdebb97787a7">snd_midi_event_init</a> (<a class="el" href="group___m_i_d_i___event.html#gdd832d6254922704a5460574b3f206a1">snd_midi_event_t</a> *dev)</td></tr>
 
37
 
 
38
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets MIDI encode/decode parsers.  <a href="#gc25407ac8f5f51d2dac7fdebb97787a7"></a><br></td></tr>
 
39
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___m_i_d_i___event.html#gf819f2d2e0228f75539e16a57a0032e0">snd_midi_event_reset_encode</a> (<a class="el" href="group___m_i_d_i___event.html#gdd832d6254922704a5460574b3f206a1">snd_midi_event_t</a> *dev)</td></tr>
 
40
 
 
41
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets MIDI encode parser.  <a href="#gf819f2d2e0228f75539e16a57a0032e0"></a><br></td></tr>
 
42
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___m_i_d_i___event.html#gf9f996d4f769302848796340a54f7d0b">snd_midi_event_reset_decode</a> (<a class="el" href="group___m_i_d_i___event.html#gdd832d6254922704a5460574b3f206a1">snd_midi_event_t</a> *dev)</td></tr>
 
43
 
 
44
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets MIDI decode parser.  <a href="#gf9f996d4f769302848796340a54f7d0b"></a><br></td></tr>
 
45
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___m_i_d_i___event.html#g987b33045060507d67eddab519c7f26d">snd_midi_event_no_status</a> (<a class="el" href="group___m_i_d_i___event.html#gdd832d6254922704a5460574b3f206a1">snd_midi_event_t</a> *dev, int on)</td></tr>
 
46
 
 
47
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enables/disables MIDI command merging.  <a href="#g987b33045060507d67eddab519c7f26d"></a><br></td></tr>
 
48
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___m_i_d_i___event.html#g5eac4cdcb9c40ec5cfc51ee4a70de92f">snd_midi_event_encode</a> (<a class="el" href="group___m_i_d_i___event.html#gdd832d6254922704a5460574b3f206a1">snd_midi_event_t</a> *dev, const unsigned char *buf, long count, <a class="el" href="structsnd__seq__event.html">snd_seq_event_t</a> *ev)</td></tr>
 
49
 
 
50
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Encodes bytes to sequencer event.  <a href="#g5eac4cdcb9c40ec5cfc51ee4a70de92f"></a><br></td></tr>
 
51
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___m_i_d_i___event.html#g3dad0c956e41c1b2532132e7f85cb876">snd_midi_event_encode_byte</a> (<a class="el" href="group___m_i_d_i___event.html#gdd832d6254922704a5460574b3f206a1">snd_midi_event_t</a> *dev, int c, <a class="el" href="structsnd__seq__event.html">snd_seq_event_t</a> *ev)</td></tr>
 
52
 
 
53
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Encodes byte to sequencer event.  <a href="#g3dad0c956e41c1b2532132e7f85cb876"></a><br></td></tr>
 
54
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___m_i_d_i___event.html#g3ba6a310da5b1a9765c274302dc11f2c">snd_midi_event_decode</a> (<a class="el" href="group___m_i_d_i___event.html#gdd832d6254922704a5460574b3f206a1">snd_midi_event_t</a> *dev, unsigned char *buf, long count, const <a class="el" href="structsnd__seq__event.html">snd_seq_event_t</a> *ev)</td></tr>
 
55
 
 
56
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Decodes sequencer event to MIDI byte stream.  <a href="#g3ba6a310da5b1a9765c274302dc11f2c"></a><br></td></tr>
 
57
</tbody></table>
 
58
<hr><a name="_details"></a><h2>Detailed Description</h2>
 
59
Sequencer event &lt;-&gt; MIDI byte stream coder <hr><h2>Typedef Documentation</h2>
 
60
<a class="anchor" name="gdd832d6254922704a5460574b3f206a1"></a><!-- doxytag: member="seq_midi_event.h::snd_midi_event_t" ref="gdd832d6254922704a5460574b3f206a1" args="" -->
 
61
<div class="memitem">
 
62
<div class="memproto">
 
63
      <table class="memname">
 
64
        <tbody><tr>
 
65
          <td class="memname">typedef struct snd_midi_event <a class="el" href="group___m_i_d_i___event.html#gdd832d6254922704a5460574b3f206a1">snd_midi_event_t</a>          </td>
 
66
        </tr>
 
67
      </tbody></table>
 
68
</div>
 
69
<div class="memdoc">
 
70
 
 
71
<p>
 
72
container for sequencer midi event parsers 
 
73
</p></div>
 
74
</div><p>
 
75
</p><hr><h2>Function Documentation</h2>
 
76
<a class="anchor" name="g3ba6a310da5b1a9765c274302dc11f2c"></a><!-- doxytag: member="seq_midi_event.h::snd_midi_event_decode" ref="g3ba6a310da5b1a9765c274302dc11f2c" args="(snd_midi_event_t *dev, unsigned char *buf, long count, const snd_seq_event_t *ev)" -->
 
77
<div class="memitem">
 
78
<div class="memproto">
 
79
      <table class="memname">
 
80
        <tbody><tr>
 
81
          <td class="memname">long snd_midi_event_decode           </td>
 
82
          <td>(</td>
 
83
          <td class="paramtype"><a class="el" href="group___m_i_d_i___event.html#gdd832d6254922704a5460574b3f206a1">snd_midi_event_t</a> *&nbsp;</td>
 
84
          <td class="paramname"> <em>dev</em>, </td>
 
85
        </tr>
 
86
        <tr>
 
87
          <td class="paramkey"><br>
 
88
</td>
 
89
          <td><br>
 
90
</td>
 
91
          <td class="paramtype">unsigned char *&nbsp;</td>
 
92
          <td class="paramname"> <em>buf</em>, </td>
 
93
        </tr>
 
94
        <tr>
 
95
          <td class="paramkey"><br>
 
96
</td>
 
97
          <td><br>
 
98
</td>
 
99
          <td class="paramtype">long&nbsp;</td>
 
100
          <td class="paramname"> <em>count</em>, </td>
 
101
        </tr>
 
102
        <tr>
 
103
          <td class="paramkey"><br>
 
104
</td>
 
105
          <td><br>
 
106
</td>
 
107
          <td class="paramtype">const <a class="el" href="structsnd__seq__event.html">snd_seq_event_t</a> *&nbsp;</td>
 
108
          <td class="paramname"> <em>ev</em></td><td>&nbsp;</td>
 
109
        </tr>
 
110
        <tr>
 
111
          <td><br>
 
112
</td>
 
113
          <td>)</td>
 
114
          <td><br>
 
115
</td><td><br>
 
116
</td><td width="100%"><br>
 
117
</td>
 
118
        </tr>
 
119
      </tbody></table>
 
120
</div>
 
121
<div class="memdoc">
 
122
 
 
123
<p>
 
124
Decodes sequencer event to MIDI byte stream. 
 
125
</p><p>
 
126
</p><dl compact="compact"><dt><b>Parameters:</b></dt><dd>
 
127
  <table border="0" cellpadding="0" cellspacing="2">
 
128
    <tbody><tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dev</em>&nbsp;</td><td>MIDI event parser. </td></tr>
 
129
    <tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>buf</em>&nbsp;</td><td>Buffer for the resulting MIDI byte stream. </td></tr>
 
130
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>count</em>&nbsp;</td><td>Number of bytes in <em>buf</em>. </td></tr>
 
131
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>ev</em>&nbsp;</td><td>The sequencer event to decode. </td></tr>
 
132
  </tbody></table>
 
133
</dd></dl>
 
134
<dl class="return" compact="compact"><dt><b>Returns:</b></dt><dd>The number of bytes written to <em>buf</em>, or a negative error code.</dd></dl>
 
135
This function tries to decode the sequencer event into one or more MIDI messages, and writes the raw MIDI byte(s) into <em>buf</em>.<p>
 
136
The generated MIDI messages may use running status, unless disabled with <a class="el" href="group___m_i_d_i___event.html#g987b33045060507d67eddab519c7f26d">snd_midi_event_no_status</a>.</p><p>
 
137
The required buffer size for a sequencer event it as most 12 bytes, except for System Exclusive events (<em>ev-&gt;type</em> == <a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cdaaca9f9f5841240dfe16f45125594668e">SND_SEQ_EVENT_SYSEX</a>) which can have any length (as specified by <em>ev-&gt;data.ext.len</em>).</p><p>
 
138
The following sequencer events correspond to MIDI messages:</p><ul>
 
139
<li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda2025ebf83f70a67393465c232f30d49e">SND_SEQ_EVENT_NOTEOFF</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda943ec11ad6722e1d083f32ca53cba973">SND_SEQ_EVENT_NOTEON</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda04b77729462837ce15cebb776365b311">SND_SEQ_EVENT_KEYPRESS</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda04f700c22fc344880a56f3b57af46b02">SND_SEQ_EVENT_CONTROLLER</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cdacb7097f39cb1d1737bb5cce023694cdc">SND_SEQ_EVENT_PGMCHANGE</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda21160b17a1a0eb28c885f8846f3cd0ff">SND_SEQ_EVENT_CHANPRESS</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cdae3461b1b18c218bdf2478aa68ef401b8">SND_SEQ_EVENT_PITCHBEND</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cdaaca9f9f5841240dfe16f45125594668e">SND_SEQ_EVENT_SYSEX</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cdabfa2f78e39a226f9896e9b542a54a3a5">SND_SEQ_EVENT_QFRAME</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cdae0ec3b9bba95747d8d43f52a951ba7a3">SND_SEQ_EVENT_SONGPOS</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda1639f777dd1439fbc3ac28a5469a60dd">SND_SEQ_EVENT_SONGSEL</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cdae60fc084b8cb4feaa22083932fcb7c2b">SND_SEQ_EVENT_TUNE_REQUEST</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda8208f08d5937ffc62f3f83803be13e25">SND_SEQ_EVENT_CLOCK</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda0f7612d76c502f1bc82b2d668e86b97f">SND_SEQ_EVENT_START</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cdabb5f9836ef3cd13650b7d91f668d569d">SND_SEQ_EVENT_CONTINUE</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda9daa8730c73fc9d7a6043dc5d5ce583f">SND_SEQ_EVENT_STOP</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda6be06d1cb11753916af3584dcaa81ac5">SND_SEQ_EVENT_SENSING</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda7c3e222980a1472fe28f0eda1eff8a61">SND_SEQ_EVENT_RESET</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cdafc236320d734d7d4c6a7cc11fe534cc9">SND_SEQ_EVENT_CONTROL14</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda3e095124ce98904fe05db1a14f5729cd">SND_SEQ_EVENT_NONREGPARAM</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda1a4c08c7838a1a11e3fb08d28779b56b">SND_SEQ_EVENT_REGPARAM</a></li></ul>
 
140
<p>
 
141
</p><dl class="user" compact="compact"><dt><b>Errors:</b></dt><dd><dl>
 
142
<dt>-EINVAL</dt>
 
143
<dd><em>ev</em> is not a valid sequencer event. </dd>
 
144
<dt>-ENOENT</dt>
 
145
<dd>The sequencer event does not correspond to one or more MIDI messages. </dd>
 
146
<dt>-ENOMEM</dt>
 
147
<dd>The MIDI message(s) would not fit into <em>count</em> bytes.<p>
 
148
 
 
149
</p></dd></dl>
 
150
</dd></dl>
 
151
<dl class="user" compact="compact"><dt><b>Conforming to:</b></dt><dd>LSB 3.2</dd></dl>
 
152
<dl class="see" compact="compact"><dt><b>See also:</b></dt><dd><a class="el" href="group___m_i_d_i___event.html#gf9f996d4f769302848796340a54f7d0b">snd_midi_event_reset_decode</a>, <a class="el" href="group___m_i_d_i___event.html#g987b33045060507d67eddab519c7f26d">snd_midi_event_no_status</a> </dd></dl>
 
153
 
 
154
</div>
 
155
</div><p>
 
156
<a class="anchor" name="g5eac4cdcb9c40ec5cfc51ee4a70de92f"></a><!-- doxytag: member="seq_midi_event.h::snd_midi_event_encode" ref="g5eac4cdcb9c40ec5cfc51ee4a70de92f" args="(snd_midi_event_t *dev, const unsigned char *buf, long count, snd_seq_event_t *ev)" -->
 
157
</p><div class="memitem">
 
158
<div class="memproto">
 
159
      <table class="memname">
 
160
        <tbody><tr>
 
161
          <td class="memname">long snd_midi_event_encode           </td>
 
162
          <td>(</td>
 
163
          <td class="paramtype"><a class="el" href="group___m_i_d_i___event.html#gdd832d6254922704a5460574b3f206a1">snd_midi_event_t</a> *&nbsp;</td>
 
164
          <td class="paramname"> <em>dev</em>, </td>
 
165
        </tr>
 
166
        <tr>
 
167
          <td class="paramkey"><br>
 
168
</td>
 
169
          <td><br>
 
170
</td>
 
171
          <td class="paramtype">const unsigned char *&nbsp;</td>
 
172
          <td class="paramname"> <em>buf</em>, </td>
 
173
        </tr>
 
174
        <tr>
 
175
          <td class="paramkey"><br>
 
176
</td>
 
177
          <td><br>
 
178
</td>
 
179
          <td class="paramtype">long&nbsp;</td>
 
180
          <td class="paramname"> <em>count</em>, </td>
 
181
        </tr>
 
182
        <tr>
 
183
          <td class="paramkey"><br>
 
184
</td>
 
185
          <td><br>
 
186
</td>
 
187
          <td class="paramtype"><a class="el" href="structsnd__seq__event.html">snd_seq_event_t</a> *&nbsp;</td>
 
188
          <td class="paramname"> <em>ev</em></td><td>&nbsp;</td>
 
189
        </tr>
 
190
        <tr>
 
191
          <td><br>
 
192
</td>
 
193
          <td>)</td>
 
194
          <td><br>
 
195
</td><td><br>
 
196
</td><td width="100%"><br>
 
197
</td>
 
198
        </tr>
 
199
      </tbody></table>
 
200
</div>
 
201
<div class="memdoc">
 
202
 
 
203
<p>
 
204
Encodes bytes to sequencer event. 
 
205
</p><p>
 
206
</p><dl compact="compact"><dt><b>Parameters:</b></dt><dd>
 
207
  <table border="0" cellpadding="0" cellspacing="2">
 
208
    <tbody><tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dev</em>&nbsp;</td><td>MIDI event parser. </td></tr>
 
209
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>buf</em>&nbsp;</td><td>Buffer containing bytes of a raw MIDI stream. </td></tr>
 
210
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>count</em>&nbsp;</td><td>Number of bytes in <em>buf</em>. </td></tr>
 
211
    <tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>ev</em>&nbsp;</td><td>Sequencer event. </td></tr>
 
212
  </tbody></table>
 
213
</dd></dl>
 
214
<dl class="return" compact="compact"><dt><b>Returns:</b></dt><dd>The number of bytes consumed, or a negative error code.</dd></dl>
 
215
This function tries to use up to <em>count</em>
 
216
bytes from the beginning of the buffer to encode a sequencer event. If
 
217
a complete MIDI message has been encoded, the sequencer event is
 
218
written to <em>ev</em>; otherwise, <em>ev-&gt;type</em> is set to <a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cdae7668538704e41a4c2c92e5d6893ca5e">SND_SEQ_EVENT_NONE</a>, and further bytes are required to complete a message.<p>
 
219
The buffer in <em>dev</em>
 
220
is used to hold any bytes of a not-yet-complete MIDI message. If a
 
221
System Exclusive message is larger than the buffer, the message is
 
222
split into multiple parts, and a sequencer event is returned at the end
 
223
of each part.</p><p>
 
224
Any bytes that are not part of a valid MIDI message are silently ignored, i.e., they are consumed without signaling an error.</p><p>
 
225
When this function returns a system exclusive sequencer event (<em>ev-&gt;type</em> is <a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cdaaca9f9f5841240dfe16f45125594668e">SND_SEQ_EVENT_SYSEX</a>), the data pointer (<em>ev-&gt;data.ext.ptr</em>)
 
226
points into the MIDI event parser's buffer. Therefore, the sequencer
 
227
event can only be used as long as that buffer remains valid, i.e.,
 
228
until the next call to <a class="el" href="group___m_i_d_i___event.html#g5eac4cdcb9c40ec5cfc51ee4a70de92f">snd_midi_event_encode</a>, <a class="el" href="group___m_i_d_i___event.html#g3dad0c956e41c1b2532132e7f85cb876">snd_midi_event_encode_byte</a>, <a class="el" href="group___m_i_d_i___event.html#gab1ad2aa43924fd0da8b98034d181da2">snd_midi_event_resize_buffer</a>, <a class="el" href="group___m_i_d_i___event.html#gc25407ac8f5f51d2dac7fdebb97787a7">snd_midi_event_init</a>, <a class="el" href="group___m_i_d_i___event.html#gf819f2d2e0228f75539e16a57a0032e0">snd_midi_event_reset_encode</a>, or <a class="el" href="group___m_i_d_i___event.html#g060373584caf402f3a53082a8068ce5a">snd_midi_event_free</a> for that MIDI event parser.</p><p>
 
229
This function can generate any sequencer event that corresponds to a MIDI message, i.e.:</p><ul>
 
230
<li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda2025ebf83f70a67393465c232f30d49e">SND_SEQ_EVENT_NOTEOFF</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda943ec11ad6722e1d083f32ca53cba973">SND_SEQ_EVENT_NOTEON</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda04b77729462837ce15cebb776365b311">SND_SEQ_EVENT_KEYPRESS</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda04f700c22fc344880a56f3b57af46b02">SND_SEQ_EVENT_CONTROLLER</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cdacb7097f39cb1d1737bb5cce023694cdc">SND_SEQ_EVENT_PGMCHANGE</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda21160b17a1a0eb28c885f8846f3cd0ff">SND_SEQ_EVENT_CHANPRESS</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cdae3461b1b18c218bdf2478aa68ef401b8">SND_SEQ_EVENT_PITCHBEND</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cdaaca9f9f5841240dfe16f45125594668e">SND_SEQ_EVENT_SYSEX</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cdabfa2f78e39a226f9896e9b542a54a3a5">SND_SEQ_EVENT_QFRAME</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cdae0ec3b9bba95747d8d43f52a951ba7a3">SND_SEQ_EVENT_SONGPOS</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda1639f777dd1439fbc3ac28a5469a60dd">SND_SEQ_EVENT_SONGSEL</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cdae60fc084b8cb4feaa22083932fcb7c2b">SND_SEQ_EVENT_TUNE_REQUEST</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda8208f08d5937ffc62f3f83803be13e25">SND_SEQ_EVENT_CLOCK</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda0f7612d76c502f1bc82b2d668e86b97f">SND_SEQ_EVENT_START</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cdabb5f9836ef3cd13650b7d91f668d569d">SND_SEQ_EVENT_CONTINUE</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda9daa8730c73fc9d7a6043dc5d5ce583f">SND_SEQ_EVENT_STOP</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda6be06d1cb11753916af3584dcaa81ac5">SND_SEQ_EVENT_SENSING</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda7c3e222980a1472fe28f0eda1eff8a61">SND_SEQ_EVENT_RESET</a></li></ul>
 
231
Some implementations may also be able to generate the following events for a sequence of controller change messages:<ul>
 
232
<li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cdafc236320d734d7d4c6a7cc11fe534cc9">SND_SEQ_EVENT_CONTROL14</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda3e095124ce98904fe05db1a14f5729cd">SND_SEQ_EVENT_NONREGPARAM</a></li><li><a class="el" href="group___seq_events.html#gg644c72e4af4461703b3fe43a7dfa5cda1a4c08c7838a1a11e3fb08d28779b56b">SND_SEQ_EVENT_REGPARAM</a></li></ul>
 
233
<p>
 
234
</p><dl class="user" compact="compact"><dt><b>Conforming to:</b></dt><dd>LSB 3.2</dd></dl>
 
235
<dl class="see" compact="compact"><dt><b>See also:</b></dt><dd><a class="el" href="group___m_i_d_i___event.html#g8a9a7658d59324aaeda36584086ae2ba">snd_midi_event_new</a>, <a class="el" href="group___m_i_d_i___event.html#gf819f2d2e0228f75539e16a57a0032e0">snd_midi_event_reset_encode</a>, <a class="el" href="group___m_i_d_i___event.html#g3dad0c956e41c1b2532132e7f85cb876">snd_midi_event_encode_byte</a> </dd></dl>
 
236
 
 
237
</div>
 
238
</div><p>
 
239
<a class="anchor" name="g3dad0c956e41c1b2532132e7f85cb876"></a><!-- doxytag: member="seq_midi_event.h::snd_midi_event_encode_byte" ref="g3dad0c956e41c1b2532132e7f85cb876" args="(snd_midi_event_t *dev, int c, snd_seq_event_t *ev)" -->
 
240
</p><div class="memitem">
 
241
<div class="memproto">
 
242
      <table class="memname">
 
243
        <tbody><tr>
 
244
          <td class="memname">int snd_midi_event_encode_byte           </td>
 
245
          <td>(</td>
 
246
          <td class="paramtype"><a class="el" href="group___m_i_d_i___event.html#gdd832d6254922704a5460574b3f206a1">snd_midi_event_t</a> *&nbsp;</td>
 
247
          <td class="paramname"> <em>dev</em>, </td>
 
248
        </tr>
 
249
        <tr>
 
250
          <td class="paramkey"><br>
 
251
</td>
 
252
          <td><br>
 
253
</td>
 
254
          <td class="paramtype">int&nbsp;</td>
 
255
          <td class="paramname"> <em>c</em>, </td>
 
256
        </tr>
 
257
        <tr>
 
258
          <td class="paramkey"><br>
 
259
</td>
 
260
          <td><br>
 
261
</td>
 
262
          <td class="paramtype"><a class="el" href="structsnd__seq__event.html">snd_seq_event_t</a> *&nbsp;</td>
 
263
          <td class="paramname"> <em>ev</em></td><td>&nbsp;</td>
 
264
        </tr>
 
265
        <tr>
 
266
          <td><br>
 
267
</td>
 
268
          <td>)</td>
 
269
          <td><br>
 
270
</td><td><br>
 
271
</td><td width="100%"><br>
 
272
</td>
 
273
        </tr>
 
274
      </tbody></table>
 
275
</div>
 
276
<div class="memdoc">
 
277
 
 
278
<p>
 
279
Encodes byte to sequencer event. 
 
280
</p><p>
 
281
</p><dl compact="compact"><dt><b>Parameters:</b></dt><dd>
 
282
  <table border="0" cellpadding="0" cellspacing="2">
 
283
    <tbody><tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dev</em>&nbsp;</td><td>MIDI event parser. </td></tr>
 
284
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>c</em>&nbsp;</td><td>A byte of a raw MIDI stream. </td></tr>
 
285
    <tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>ev</em>&nbsp;</td><td>Sequencer event. </td></tr>
 
286
  </tbody></table>
 
287
</dd></dl>
 
288
<dl class="return" compact="compact"><dt><b>Returns:</b></dt><dd>1 if a sequenver event has been completed, 0 if more bytes are required to complete an event, or a negative error code.</dd></dl>
 
289
This function tries to use the byte <em>c</em> to encode a sequencer event. If a complete MIDI message has been encoded, the sequencer event is written to <em>ev</em>; otherwise, further bytes are required to complete a message.<p>
 
290
See also the description of <a class="el" href="group___m_i_d_i___event.html#g5eac4cdcb9c40ec5cfc51ee4a70de92f">snd_midi_event_encode</a>.</p><p>
 
291
</p><dl class="user" compact="compact"><dt><b>Conforming to:</b></dt><dd>LSB 3.2</dd></dl>
 
292
<dl class="see" compact="compact"><dt><b>See also:</b></dt><dd><a class="el" href="group___m_i_d_i___event.html#g8a9a7658d59324aaeda36584086ae2ba">snd_midi_event_new</a>, <a class="el" href="group___m_i_d_i___event.html#gf819f2d2e0228f75539e16a57a0032e0">snd_midi_event_reset_encode</a>, <a class="el" href="group___m_i_d_i___event.html#g5eac4cdcb9c40ec5cfc51ee4a70de92f">snd_midi_event_encode</a> </dd></dl>
 
293
 
 
294
</div>
 
295
</div><p>
 
296
<a class="anchor" name="g060373584caf402f3a53082a8068ce5a"></a><!-- doxytag: member="seq_midi_event.h::snd_midi_event_free" ref="g060373584caf402f3a53082a8068ce5a" args="(snd_midi_event_t *dev)" -->
 
297
</p><div class="memitem">
 
298
<div class="memproto">
 
299
      <table class="memname">
 
300
        <tbody><tr>
 
301
          <td class="memname">void snd_midi_event_free           </td>
 
302
          <td>(</td>
 
303
          <td class="paramtype"><a class="el" href="group___m_i_d_i___event.html#gdd832d6254922704a5460574b3f206a1">snd_midi_event_t</a> *&nbsp;</td>
 
304
          <td class="paramname"> <em>dev</em>          </td>
 
305
          <td>&nbsp;)&nbsp;</td>
 
306
          <td width="100%"><br>
 
307
</td>
 
308
        </tr>
 
309
      </tbody></table>
 
310
</div>
 
311
<div class="memdoc">
 
312
 
 
313
<p>
 
314
Frees a MIDI event parser. 
 
315
</p><p>
 
316
</p><dl compact="compact"><dt><b>Parameters:</b></dt><dd>
 
317
  <table border="0" cellpadding="0" cellspacing="2">
 
318
    <tbody><tr><td valign="top"><br>
 
319
</td><td valign="top"><em>dev</em>&nbsp;</td><td>MIDI event parser.</td></tr>
 
320
  </tbody></table>
 
321
</dd></dl>
 
322
Frees a MIDI event parser.<p>
 
323
</p><dl class="user" compact="compact"><dt><b>Conforming to:</b></dt><dd>LSB 3.2 </dd></dl>
 
324
 
 
325
</div>
 
326
</div><p>
 
327
<a class="anchor" name="gc25407ac8f5f51d2dac7fdebb97787a7"></a><!-- doxytag: member="seq_midi_event.h::snd_midi_event_init" ref="gc25407ac8f5f51d2dac7fdebb97787a7" args="(snd_midi_event_t *dev)" -->
 
328
</p><div class="memitem">
 
329
<div class="memproto">
 
330
      <table class="memname">
 
331
        <tbody><tr>
 
332
          <td class="memname">void snd_midi_event_init           </td>
 
333
          <td>(</td>
 
334
          <td class="paramtype"><a class="el" href="group___m_i_d_i___event.html#gdd832d6254922704a5460574b3f206a1">snd_midi_event_t</a> *&nbsp;</td>
 
335
          <td class="paramname"> <em>dev</em>          </td>
 
336
          <td>&nbsp;)&nbsp;</td>
 
337
          <td width="100%"><br>
 
338
</td>
 
339
        </tr>
 
340
      </tbody></table>
 
341
</div>
 
342
<div class="memdoc">
 
343
 
 
344
<p>
 
345
Resets MIDI encode/decode parsers. 
 
346
</p><p>
 
347
</p><dl compact="compact"><dt><b>Parameters:</b></dt><dd>
 
348
  <table border="0" cellpadding="0" cellspacing="2">
 
349
    <tbody><tr><td valign="top"><br>
 
350
</td><td valign="top"><em>dev</em>&nbsp;</td><td>MIDI event parser.</td></tr>
 
351
  </tbody></table>
 
352
</dd></dl>
 
353
This function resets both encoder and decoder of the MIDI event parser. <dl class="see" compact="compact"><dt><b>See also:</b></dt><dd><a class="el" href="group___m_i_d_i___event.html#gf819f2d2e0228f75539e16a57a0032e0">snd_midi_event_reset_encode</a>, <a class="el" href="group___m_i_d_i___event.html#gf9f996d4f769302848796340a54f7d0b">snd_midi_event_reset_decode</a></dd></dl>
 
354
<dl class="user" compact="compact"><dt><b>Conforming to:</b></dt><dd>LSB 3.2 </dd></dl>
 
355
 
 
356
</div>
 
357
</div><p>
 
358
<a class="anchor" name="g8a9a7658d59324aaeda36584086ae2ba"></a><!-- doxytag: member="seq_midi_event.h::snd_midi_event_new" ref="g8a9a7658d59324aaeda36584086ae2ba" args="(size_t bufsize, snd_midi_event_t **rdev)" -->
 
359
</p><div class="memitem">
 
360
<div class="memproto">
 
361
      <table class="memname">
 
362
        <tbody><tr>
 
363
          <td class="memname">int snd_midi_event_new           </td>
 
364
          <td>(</td>
 
365
          <td class="paramtype">size_t&nbsp;</td>
 
366
          <td class="paramname"> <em>bufsize</em>, </td>
 
367
        </tr>
 
368
        <tr>
 
369
          <td class="paramkey"><br>
 
370
</td>
 
371
          <td><br>
 
372
</td>
 
373
          <td class="paramtype"><a class="el" href="group___m_i_d_i___event.html#gdd832d6254922704a5460574b3f206a1">snd_midi_event_t</a> **&nbsp;</td>
 
374
          <td class="paramname"> <em>rdev</em></td><td>&nbsp;</td>
 
375
        </tr>
 
376
        <tr>
 
377
          <td><br>
 
378
</td>
 
379
          <td>)</td>
 
380
          <td><br>
 
381
</td><td><br>
 
382
</td><td width="100%"><br>
 
383
</td>
 
384
        </tr>
 
385
      </tbody></table>
 
386
</div>
 
387
<div class="memdoc">
 
388
 
 
389
<p>
 
390
Creates a MIDI event parser. 
 
391
</p><p>
 
392
</p><dl compact="compact"><dt><b>Parameters:</b></dt><dd>
 
393
  <table border="0" cellpadding="0" cellspacing="2">
 
394
    <tbody><tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>bufsize</em>&nbsp;</td><td>Size of the buffer used for encoding; this should be large enough to hold the largest MIDI message to be encoded. </td></tr>
 
395
    <tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>rdev</em>&nbsp;</td><td>The new MIDI event parser. </td></tr>
 
396
  </tbody></table>
 
397
</dd></dl>
 
398
<dl class="return" compact="compact"><dt><b>Returns:</b></dt><dd>Zero on success, otherwise a negative error code.</dd></dl>This
 
399
function creates and initializes a MIDI parser object that can be used
 
400
to convert a MIDI byte stream to sequencer events (encoding) and/or to
 
401
convert sequencer events to a MIDI byte stream (decoding).<p>
 
402
</p><dl class="user" compact="compact"><dt><b>Errors:</b></dt><dd><dl>
 
403
<dt>-ENOMEM</dt>
 
404
<dd>Out of memory.<p>
 
405
 
 
406
</p></dd></dl>
 
407
</dd></dl>
 
408
<dl class="user" compact="compact"><dt><b>Conforming to:</b></dt><dd>LSB 3.2 </dd></dl>
 
409
 
 
410
</div>
 
411
</div><p>
 
412
<a class="anchor" name="g987b33045060507d67eddab519c7f26d"></a><!-- doxytag: member="seq_midi_event.h::snd_midi_event_no_status" ref="g987b33045060507d67eddab519c7f26d" args="(snd_midi_event_t *dev, int on)" -->
 
413
</p><div class="memitem">
 
414
<div class="memproto">
 
415
      <table class="memname">
 
416
        <tbody><tr>
 
417
          <td class="memname">void snd_midi_event_no_status           </td>
 
418
          <td>(</td>
 
419
          <td class="paramtype"><a class="el" href="group___m_i_d_i___event.html#gdd832d6254922704a5460574b3f206a1">snd_midi_event_t</a> *&nbsp;</td>
 
420
          <td class="paramname"> <em>dev</em>, </td>
 
421
        </tr>
 
422
        <tr>
 
423
          <td class="paramkey"><br>
 
424
</td>
 
425
          <td><br>
 
426
</td>
 
427
          <td class="paramtype">int&nbsp;</td>
 
428
          <td class="paramname"> <em>on</em></td><td>&nbsp;</td>
 
429
        </tr>
 
430
        <tr>
 
431
          <td><br>
 
432
</td>
 
433
          <td>)</td>
 
434
          <td><br>
 
435
</td><td><br>
 
436
</td><td width="100%"><br>
 
437
</td>
 
438
        </tr>
 
439
      </tbody></table>
 
440
</div>
 
441
<div class="memdoc">
 
442
 
 
443
<p>
 
444
Enables/disables MIDI command merging. 
 
445
</p><p>
 
446
</p><dl compact="compact"><dt><b>Parameters:</b></dt><dd>
 
447
  <table border="0" cellpadding="0" cellspacing="2">
 
448
    <tbody><tr><td valign="top"><br>
 
449
</td><td valign="top"><em>dev</em>&nbsp;</td><td>MIDI event parser. </td></tr>
 
450
    <tr><td valign="top"><br>
 
451
</td><td valign="top"><em>on</em>&nbsp;</td><td>0 to enable MIDI command merging, 1 to always write the command byte.</td></tr>
 
452
  </tbody></table>
 
453
</dd></dl>
 
454
This function enables or disables MIDI command merging (running status).<p>
 
455
When MIDI command merging is not disabled, <a class="el" href="group___m_i_d_i___event.html#g3ba6a310da5b1a9765c274302dc11f2c">snd_midi_event_decode</a> is allowed to omit any status byte that is identical to the previous status byte. 
 
456
</p></div>
 
457
</div><p>
 
458
<a class="anchor" name="gf9f996d4f769302848796340a54f7d0b"></a><!-- doxytag: member="seq_midi_event.h::snd_midi_event_reset_decode" ref="gf9f996d4f769302848796340a54f7d0b" args="(snd_midi_event_t *dev)" -->
 
459
</p><div class="memitem">
 
460
<div class="memproto">
 
461
      <table class="memname">
 
462
        <tbody><tr>
 
463
          <td class="memname">void snd_midi_event_reset_decode           </td>
 
464
          <td>(</td>
 
465
          <td class="paramtype"><a class="el" href="group___m_i_d_i___event.html#gdd832d6254922704a5460574b3f206a1">snd_midi_event_t</a> *&nbsp;</td>
 
466
          <td class="paramname"> <em>dev</em>          </td>
 
467
          <td>&nbsp;)&nbsp;</td>
 
468
          <td width="100%"><br>
 
469
</td>
 
470
        </tr>
 
471
      </tbody></table>
 
472
</div>
 
473
<div class="memdoc">
 
474
 
 
475
<p>
 
476
Resets MIDI decode parser. 
 
477
</p><p>
 
478
</p><dl compact="compact"><dt><b>Parameters:</b></dt><dd>
 
479
  <table border="0" cellpadding="0" cellspacing="2">
 
480
    <tbody><tr><td valign="top"><br>
 
481
</td><td valign="top"><em>dev</em>&nbsp;</td><td>MIDI event parser.</td></tr>
 
482
  </tbody></table>
 
483
</dd></dl>
 
484
This function resets the MIDI decoder of the parser <em>dev</em>. The next decoded message does not use running status from before the call to <em>snd_midi_event_reset_decode</em>.<p>
 
485
</p><dl class="user" compact="compact"><dt><b>Conforming to:</b></dt><dd>LSB 3.2 </dd></dl>
 
486
 
 
487
</div>
 
488
</div><p>
 
489
<a class="anchor" name="gf819f2d2e0228f75539e16a57a0032e0"></a><!-- doxytag: member="seq_midi_event.h::snd_midi_event_reset_encode" ref="gf819f2d2e0228f75539e16a57a0032e0" args="(snd_midi_event_t *dev)" -->
 
490
</p><div class="memitem">
 
491
<div class="memproto">
 
492
      <table class="memname">
 
493
        <tbody><tr>
 
494
          <td class="memname">void snd_midi_event_reset_encode           </td>
 
495
          <td>(</td>
 
496
          <td class="paramtype"><a class="el" href="group___m_i_d_i___event.html#gdd832d6254922704a5460574b3f206a1">snd_midi_event_t</a> *&nbsp;</td>
 
497
          <td class="paramname"> <em>dev</em>          </td>
 
498
          <td>&nbsp;)&nbsp;</td>
 
499
          <td width="100%"><br>
 
500
</td>
 
501
        </tr>
 
502
      </tbody></table>
 
503
</div>
 
504
<div class="memdoc">
 
505
 
 
506
<p>
 
507
Resets MIDI encode parser. 
 
508
</p><p>
 
509
</p><dl compact="compact"><dt><b>Parameters:</b></dt><dd>
 
510
  <table border="0" cellpadding="0" cellspacing="2">
 
511
    <tbody><tr><td valign="top"><br>
 
512
</td><td valign="top"><em>dev</em>&nbsp;</td><td>MIDI event parser.</td></tr>
 
513
  </tbody></table>
 
514
</dd></dl>
 
515
This function resets the MIDI encoder of the parser <em>dev</em>. Any partially encoded MIDI message is dropped, and running status state is cleared.<p>
 
516
</p><dl class="user" compact="compact"><dt><b>Conforming to:</b></dt><dd>LSB 3.2 </dd></dl>
 
517
 
 
518
</div>
 
519
</div><p>
 
520
<a class="anchor" name="gab1ad2aa43924fd0da8b98034d181da2"></a><!-- doxytag: member="seq_midi_event.h::snd_midi_event_resize_buffer" ref="gab1ad2aa43924fd0da8b98034d181da2" args="(snd_midi_event_t *dev, size_t bufsize)" -->
 
521
</p><div class="memitem">
 
522
<div class="memproto">
 
523
      <table class="memname">
 
524
        <tbody><tr>
 
525
          <td class="memname">int snd_midi_event_resize_buffer           </td>
 
526
          <td>(</td>
 
527
          <td class="paramtype"><a class="el" href="group___m_i_d_i___event.html#gdd832d6254922704a5460574b3f206a1">snd_midi_event_t</a> *&nbsp;</td>
 
528
          <td class="paramname"> <em>dev</em>, </td>
 
529
        </tr>
 
530
        <tr>
 
531
          <td class="paramkey"><br>
 
532
</td>
 
533
          <td><br>
 
534
</td>
 
535
          <td class="paramtype">size_t&nbsp;</td>
 
536
          <td class="paramname"> <em>bufsize</em></td><td>&nbsp;</td>
 
537
        </tr>
 
538
        <tr>
 
539
          <td><br>
 
540
</td>
 
541
          <td>)</td>
 
542
          <td><br>
 
543
</td><td><br>
 
544
</td><td width="100%"><br>
 
545
</td>
 
546
        </tr>
 
547
      </tbody></table>
 
548
</div>
 
549
<div class="memdoc">
 
550
 
 
551
<p>
 
552
Resizes the MIDI message encoding buffer. 
 
553
</p><p>
 
554
</p><dl compact="compact"><dt><b>Parameters:</b></dt><dd>
 
555
  <table border="0" cellpadding="0" cellspacing="2">
 
556
    <tbody><tr><td valign="top"><br>
 
557
</td><td valign="top"><em>dev</em>&nbsp;</td><td>MIDI event parser. </td></tr>
 
558
    <tr><td valign="top"><br>
 
559
</td><td valign="top"><em>bufsize</em>&nbsp;</td><td>The new buffer size. </td></tr>
 
560
  </tbody></table>
 
561
</dd></dl>
 
562
<dl class="return" compact="compact"><dt><b>Returns:</b></dt><dd>Zero on success, otherwise a negative error code.</dd></dl>
 
563
This function resizes the buffer that is used to hold partially encoded MIDI messages.<p>
 
564
If there is a partially encoded message in the buffer, it is dropped.</p><p>
 
565
</p><dl class="user" compact="compact"><dt><b>Errors:</b></dt><dd><dl>
 
566
<dt>-ENOMEM</dt>
 
567
<dd>Out of memory.<p>
 
568
 
 
569
</p></dd></dl>
 
570
</dd></dl>
 
571
<dl class="see" compact="compact"><dt><b>See also:</b></dt><dd><a class="el" href="group___m_i_d_i___event.html#g5eac4cdcb9c40ec5cfc51ee4a70de92f">snd_midi_event_encode</a>, <a class="el" href="group___m_i_d_i___event.html#gf819f2d2e0228f75539e16a57a0032e0">snd_midi_event_reset_encode</a> </dd></dl>
 
572
 
 
573
</div>
 
574
</div><p>
 
575
</p><hr size="1"><address style=""><small>Generated on Wed Sep 9 14:37:09 2009 for ALSA project - the C library reference by&nbsp;
 
576
<a href="http://www.doxygen.org/index.html">
 
577
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.0 </small></address>
 
578
</body></html>
 
 
b'\\ No newline at end of file'