forked from jackaudio/jackaudio.github.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgroup__TransportControl.html
More file actions
532 lines (506 loc) · 34.5 KB
/
Copy pathgroup__TransportControl.html
File metadata and controls
532 lines (506 loc) · 34.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>JACK-AUDIO-CONNECTION-KIT: Transport and Timebase control</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">JACK-AUDIO-CONNECTION-KIT
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#typedef-members">Typedefs</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Transport and Timebase control</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga566f27eba84e0029eb05a631be52b2e5"><td class="memItemLeft" align="right" valign="top">typedef int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__TransportControl.html#ga566f27eba84e0029eb05a631be52b2e5">JackSyncCallback</a>) (<a class="el" href="transport_8h.html#a66e50952a88eb087867922bfe3d0bd72">jack_transport_state_t</a> state, <a class="el" href="structjack__position__t.html">jack_position_t</a> *pos, void *arg)</td></tr>
<tr class="separator:ga566f27eba84e0029eb05a631be52b2e5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga27ed5006f91b931408b11a5b31150af0"><td class="memItemLeft" align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__TransportControl.html#ga27ed5006f91b931408b11a5b31150af0">JackTimebaseCallback</a>) (<a class="el" href="transport_8h.html#a66e50952a88eb087867922bfe3d0bd72">jack_transport_state_t</a> state, <a class="el" href="types_8h.html#aa954df532e901ae5172e68a23f3da9b6">jack_nframes_t</a> nframes, <a class="el" href="structjack__position__t.html">jack_position_t</a> *pos, int new_pos, void *arg)</td></tr>
<tr class="separator:ga27ed5006f91b931408b11a5b31150af0"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaea06ff63b129ec6266b2b805b6c8216a"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__TransportControl.html#gaea06ff63b129ec6266b2b805b6c8216a">jack_release_timebase</a> (<a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> *<a class="el" href="simple__client_8c.html#afed7053cd7bdd1cce33dec7213f340ea">client</a>) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="separator:gaea06ff63b129ec6266b2b805b6c8216a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gae53f7ac54804d2896d51b6ad599fa93c"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__TransportControl.html#gae53f7ac54804d2896d51b6ad599fa93c">jack_set_sync_callback</a> (<a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> *<a class="el" href="simple__client_8c.html#afed7053cd7bdd1cce33dec7213f340ea">client</a>, <a class="el" href="group__TransportControl.html#ga566f27eba84e0029eb05a631be52b2e5">JackSyncCallback</a> sync_callback, void *arg) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="separator:gae53f7ac54804d2896d51b6ad599fa93c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga2e89b0bb8702d34bcbbe1eac70685ab2"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__TransportControl.html#ga2e89b0bb8702d34bcbbe1eac70685ab2">jack_set_sync_timeout</a> (<a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> *<a class="el" href="simple__client_8c.html#afed7053cd7bdd1cce33dec7213f340ea">client</a>, <a class="el" href="types_8h.html#af9a29b8728e95cc38e2932c0ef855b7e">jack_time_t</a> timeout) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="separator:ga2e89b0bb8702d34bcbbe1eac70685ab2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga0c2f2f464f6ba1c0b2aa45e6507b7aa9"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__TransportControl.html#ga0c2f2f464f6ba1c0b2aa45e6507b7aa9">jack_set_timebase_callback</a> (<a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> *<a class="el" href="simple__client_8c.html#afed7053cd7bdd1cce33dec7213f340ea">client</a>, int conditional, <a class="el" href="group__TransportControl.html#ga27ed5006f91b931408b11a5b31150af0">JackTimebaseCallback</a> timebase_callback, void *arg) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="separator:ga0c2f2f464f6ba1c0b2aa45e6507b7aa9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gab3f52a42084aead87fd1ee75ed25b240"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__TransportControl.html#gab3f52a42084aead87fd1ee75ed25b240">jack_transport_locate</a> (<a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> *<a class="el" href="simple__client_8c.html#afed7053cd7bdd1cce33dec7213f340ea">client</a>, <a class="el" href="types_8h.html#aa954df532e901ae5172e68a23f3da9b6">jack_nframes_t</a> frame) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="separator:gab3f52a42084aead87fd1ee75ed25b240"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga5f08eb71a5ee5431a3d756af5729d5aa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="transport_8h.html#a66e50952a88eb087867922bfe3d0bd72">jack_transport_state_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__TransportControl.html#ga5f08eb71a5ee5431a3d756af5729d5aa">jack_transport_query</a> (const <a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> *<a class="el" href="simple__client_8c.html#afed7053cd7bdd1cce33dec7213f340ea">client</a>, <a class="el" href="structjack__position__t.html">jack_position_t</a> *pos) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="separator:ga5f08eb71a5ee5431a3d756af5729d5aa"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaef1df9479faa3b7f400c787be173f805"><td class="memItemLeft" align="right" valign="top"><a class="el" href="types_8h.html#aa954df532e901ae5172e68a23f3da9b6">jack_nframes_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__TransportControl.html#gaef1df9479faa3b7f400c787be173f805">jack_get_current_transport_frame</a> (const <a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> *<a class="el" href="simple__client_8c.html#afed7053cd7bdd1cce33dec7213f340ea">client</a>) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="separator:gaef1df9479faa3b7f400c787be173f805"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga2f371010358add3cbed8454bd0bd2ef8"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__TransportControl.html#ga2f371010358add3cbed8454bd0bd2ef8">jack_transport_reposition</a> (<a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> *<a class="el" href="simple__client_8c.html#afed7053cd7bdd1cce33dec7213f340ea">client</a>, const <a class="el" href="structjack__position__t.html">jack_position_t</a> *pos) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="separator:ga2f371010358add3cbed8454bd0bd2ef8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gab7b158bec8f27c03da29795f142d1caf"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__TransportControl.html#gab7b158bec8f27c03da29795f142d1caf">jack_transport_start</a> (<a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> *<a class="el" href="simple__client_8c.html#afed7053cd7bdd1cce33dec7213f340ea">client</a>) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="separator:gab7b158bec8f27c03da29795f142d1caf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga6be6637c314bd88344826e9bcc1957b0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__TransportControl.html#ga6be6637c314bd88344826e9bcc1957b0">jack_transport_stop</a> (<a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> *<a class="el" href="simple__client_8c.html#afed7053cd7bdd1cce33dec7213f340ea">client</a>) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="separator:ga6be6637c314bd88344826e9bcc1957b0"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="ga566f27eba84e0029eb05a631be52b2e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga566f27eba84e0029eb05a631be52b2e5">◆ </a></span>JackSyncCallback</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef int(* JackSyncCallback) (<a class="el" href="transport_8h.html#a66e50952a88eb087867922bfe3d0bd72">jack_transport_state_t</a> state, <a class="el" href="structjack__position__t.html">jack_position_t</a> *pos, void *arg)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Prototype for the <em>sync_callback</em> defined by <a class="el" href="transport-design.html#slowsyncclients">slow-sync clients</a>. When the client is active, this callback is invoked just before <a class="el" href="simple__client_8c.html#a01271cc6cf692278ae35d0062935d7ae">process()</a> in the same thread. This occurs once after registration, then subsequently whenever some client requests a new position, or the transport enters the <a class="el" href="transport_8h.html#a66e50952a88eb087867922bfe3d0bd72a8c1e22fce8ef6c18baf7a5c6a69060ac">JackTransportStarting</a> state. This realtime function must not wait.</p>
<p>The transport <em>state</em> will be:</p>
<ul>
<li><a class="el" href="transport_8h.html#a66e50952a88eb087867922bfe3d0bd72a30087dc754e67549d91e78a4242393f0">JackTransportStopped</a> when a new position is requested;</li>
<li><a class="el" href="transport_8h.html#a66e50952a88eb087867922bfe3d0bd72a8c1e22fce8ef6c18baf7a5c6a69060ac">JackTransportStarting</a> when the transport is waiting to start;</li>
<li><a class="el" href="transport_8h.html#a66e50952a88eb087867922bfe3d0bd72a4077d7d6fe566f3f0441755a588ad1b2">JackTransportRolling</a> when the timeout has expired, and the position is now a moving target.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">state</td><td>current transport state. </td></tr>
<tr><td class="paramname">pos</td><td>new transport position. </td></tr>
<tr><td class="paramname">arg</td><td>the argument supplied by <a class="el" href="group__TransportControl.html#gae53f7ac54804d2896d51b6ad599fa93c">jack_set_sync_callback()</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE (non-zero) when ready to roll. </dd></dl>
</div>
</div>
<a id="ga27ed5006f91b931408b11a5b31150af0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga27ed5006f91b931408b11a5b31150af0">◆ </a></span>JackTimebaseCallback</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void(* JackTimebaseCallback) (<a class="el" href="transport_8h.html#a66e50952a88eb087867922bfe3d0bd72">jack_transport_state_t</a> state, <a class="el" href="types_8h.html#aa954df532e901ae5172e68a23f3da9b6">jack_nframes_t</a> nframes, <a class="el" href="structjack__position__t.html">jack_position_t</a> *pos, int new_pos, void *arg)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Prototype for the <em>timebase_callback</em> used to provide extended position information. Its output affects all of the following process cycle. This realtime function must not wait.</p>
<p>This function is called immediately after <a class="el" href="simple__client_8c.html#a01271cc6cf692278ae35d0062935d7ae">process()</a> in the same thread whenever the transport is rolling, or when any client has requested a new position in the previous cycle. The first cycle after <a class="el" href="group__TransportControl.html#ga0c2f2f464f6ba1c0b2aa45e6507b7aa9">jack_set_timebase_callback()</a> is also treated as a new position, or the first cycle after <a class="el" href="group__ClientFunctions.html#ga9800d5b29bd7670d9944a15f6ea0ecf8">jack_activate()</a> if the client had been inactive.</p>
<p>The timebase master may not use its <em>pos</em> argument to set <em>pos->frame</em>. To change position, use <a class="el" href="group__TransportControl.html#ga2f371010358add3cbed8454bd0bd2ef8">jack_transport_reposition()</a> or <a class="el" href="group__TransportControl.html#gab3f52a42084aead87fd1ee75ed25b240">jack_transport_locate()</a>. These functions are realtime-safe, the <em>timebase_callback</em> can call them directly.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">state</td><td>current transport state. </td></tr>
<tr><td class="paramname">nframes</td><td>number of frames in current period. </td></tr>
<tr><td class="paramname">pos</td><td>address of the position structure for the next cycle; <em>pos->frame</em> will be its frame number. If <em>new_pos</em> is FALSE, this structure contains extended position information from the current cycle. If TRUE, it contains whatever was set by the requester. The <em>timebase_callback's</em> task is to update the extended information here. </td></tr>
<tr><td class="paramname">new_pos</td><td>TRUE (non-zero) for a newly requested <em>pos</em>, or for the first cycle after the <em>timebase_callback</em> is defined. </td></tr>
<tr><td class="paramname">arg</td><td>the argument supplied by <a class="el" href="group__TransportControl.html#ga0c2f2f464f6ba1c0b2aa45e6507b7aa9">jack_set_timebase_callback()</a>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="gaef1df9479faa3b7f400c787be173f805"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaef1df9479faa3b7f400c787be173f805">◆ </a></span>jack_get_current_transport_frame()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="types_8h.html#aa954df532e901ae5172e68a23f3da9b6">jack_nframes_t</a> jack_get_current_transport_frame </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> * </td>
<td class="paramname"><em>client</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return an estimate of the current transport frame, including any time elapsed since the last transport positional update.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">client</td><td>the JACK client structure </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="gaea06ff63b129ec6266b2b805b6c8216a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaea06ff63b129ec6266b2b805b6c8216a">◆ </a></span>jack_release_timebase()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int jack_release_timebase </td>
<td>(</td>
<td class="paramtype"><a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> * </td>
<td class="paramname"><em>client</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Called by the timebase master to release itself from that responsibility.</p>
<p>If the timebase master releases the timebase or leaves the JACK graph for any reason, the JACK engine takes over at the start of the next process cycle. The transport state does not change. If rolling, it continues to play, with frame numbers as the only available position information.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__TransportControl.html#ga0c2f2f464f6ba1c0b2aa45e6507b7aa9">jack_set_timebase_callback</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">client</td><td>the JACK client structure.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success, otherwise a non-zero error code. </dd></dl>
</div>
</div>
<a id="gae53f7ac54804d2896d51b6ad599fa93c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae53f7ac54804d2896d51b6ad599fa93c">◆ </a></span>jack_set_sync_callback()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int jack_set_sync_callback </td>
<td>(</td>
<td class="paramtype"><a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> * </td>
<td class="paramname"><em>client</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__TransportControl.html#ga566f27eba84e0029eb05a631be52b2e5">JackSyncCallback</a> </td>
<td class="paramname"><em>sync_callback</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>arg</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Register (or unregister) as a <a class="el" href="transport-design.html#slowsyncclients">slow-sync client</a>, that cannot respond immediately to transport position changes.</p>
<p>The <em>sync_callback</em> will be invoked at the first available opportunity after its registration is complete. If the client is currently active this will be the following process cycle, otherwise it will be the first cycle after calling <a class="el" href="group__ClientFunctions.html#ga9800d5b29bd7670d9944a15f6ea0ecf8">jack_activate()</a>. After that, it runs according to the <a class="el" href="group__TransportControl.html#ga566f27eba84e0029eb05a631be52b2e5">JackSyncCallback</a> rules. Clients that don't set a <em>sync_callback</em> are assumed to be ready immediately any time the transport wants to start.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">client</td><td>the JACK client structure. </td></tr>
<tr><td class="paramname">sync_callback</td><td>is a realtime function that returns TRUE when the client is ready. Setting <em>sync_callback</em> to NULL declares that this client no longer requires slow-sync processing. </td></tr>
<tr><td class="paramname">arg</td><td>an argument for the <em>sync_callback</em> function.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success, otherwise a non-zero error code. </dd></dl>
</div>
</div>
<a id="ga2e89b0bb8702d34bcbbe1eac70685ab2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2e89b0bb8702d34bcbbe1eac70685ab2">◆ </a></span>jack_set_sync_timeout()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int jack_set_sync_timeout </td>
<td>(</td>
<td class="paramtype"><a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> * </td>
<td class="paramname"><em>client</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="types_8h.html#af9a29b8728e95cc38e2932c0ef855b7e">jack_time_t</a> </td>
<td class="paramname"><em>timeout</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the timeout value for <a class="el" href="transport-design.html#slowsyncclients">slow-sync clients</a>.</p>
<p>This timeout prevents unresponsive slow-sync clients from completely halting the transport mechanism. The default is two seconds. When the timeout expires, the transport starts rolling, even if some slow-sync clients are still unready. The <em>sync_callbacks</em> of these clients continue being invoked, giving them a chance to catch up.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__TransportControl.html#gae53f7ac54804d2896d51b6ad599fa93c">jack_set_sync_callback</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">client</td><td>the JACK client structure. </td></tr>
<tr><td class="paramname">timeout</td><td>is delay (in microseconds) before the timeout expires.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success, otherwise a non-zero error code. </dd></dl>
</div>
</div>
<a id="ga0c2f2f464f6ba1c0b2aa45e6507b7aa9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0c2f2f464f6ba1c0b2aa45e6507b7aa9">◆ </a></span>jack_set_timebase_callback()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int jack_set_timebase_callback </td>
<td>(</td>
<td class="paramtype"><a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> * </td>
<td class="paramname"><em>client</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>conditional</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__TransportControl.html#ga27ed5006f91b931408b11a5b31150af0">JackTimebaseCallback</a> </td>
<td class="paramname"><em>timebase_callback</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>arg</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Register as timebase master for the JACK subsystem.</p>
<p>The timebase master registers a callback that updates extended position information such as beats or timecode whenever necessary. Without this extended information, there is no need for this function.</p>
<p>There is never more than one master at a time. When a new client takes over, the former <em>timebase_callback</em> is no longer called. Taking over the timebase may be done conditionally, so it fails if there was a master already.</p>
<p>The method may be called whether the client has been activated or not.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">client</td><td>the JACK client structure. </td></tr>
<tr><td class="paramname">conditional</td><td>non-zero for a conditional request. </td></tr>
<tr><td class="paramname">timebase_callback</td><td>is a realtime function that returns position information. </td></tr>
<tr><td class="paramname">arg</td><td>an argument for the <em>timebase_callback</em> function.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>0 on success;</li>
<li>EBUSY if a conditional request fails because there was already a timebase master;</li>
<li>other non-zero error code. </li>
</ul>
</dd></dl>
</div>
</div>
<a id="gab3f52a42084aead87fd1ee75ed25b240"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab3f52a42084aead87fd1ee75ed25b240">◆ </a></span>jack_transport_locate()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int jack_transport_locate </td>
<td>(</td>
<td class="paramtype"><a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> * </td>
<td class="paramname"><em>client</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="types_8h.html#aa954df532e901ae5172e68a23f3da9b6">jack_nframes_t</a> </td>
<td class="paramname"><em>frame</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Reposition the transport to a new frame number.</p>
<p>May be called at any time by any client. The new position takes effect in two process cycles. If there are <a class="el" href="transport-design.html#slowsyncclients">slow-sync clients</a> and the transport is already rolling, it will enter the <a class="el" href="transport_8h.html#a66e50952a88eb087867922bfe3d0bd72a8c1e22fce8ef6c18baf7a5c6a69060ac">JackTransportStarting</a> state and begin invoking their <em>sync_callbacks</em> until ready. This function is realtime-safe.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__TransportControl.html#ga2f371010358add3cbed8454bd0bd2ef8">jack_transport_reposition</a>, <a class="el" href="group__TransportControl.html#gae53f7ac54804d2896d51b6ad599fa93c">jack_set_sync_callback</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">client</td><td>the JACK client structure. </td></tr>
<tr><td class="paramname">frame</td><td>frame number of new transport position.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 if valid request, non-zero otherwise. </dd></dl>
</div>
</div>
<a id="ga5f08eb71a5ee5431a3d756af5729d5aa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5f08eb71a5ee5431a3d756af5729d5aa">◆ </a></span>jack_transport_query()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="transport_8h.html#a66e50952a88eb087867922bfe3d0bd72">jack_transport_state_t</a> jack_transport_query </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> * </td>
<td class="paramname"><em>client</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structjack__position__t.html">jack_position_t</a> * </td>
<td class="paramname"><em>pos</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Query the current transport state and position.</p>
<p>This function is realtime-safe, and can be called from any thread. If called from the process thread, <em>pos</em> corresponds to the first frame of the current cycle and the state returned is valid for the entire cycle.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">client</td><td>the JACK client structure. </td></tr>
<tr><td class="paramname">pos</td><td>pointer to structure for returning current transport position; <em>pos->valid</em> will show which fields contain valid data. If <em>pos</em> is NULL, do not return position information.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Current transport state. </dd></dl>
</div>
</div>
<a id="ga2f371010358add3cbed8454bd0bd2ef8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2f371010358add3cbed8454bd0bd2ef8">◆ </a></span>jack_transport_reposition()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int jack_transport_reposition </td>
<td>(</td>
<td class="paramtype"><a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> * </td>
<td class="paramname"><em>client</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structjack__position__t.html">jack_position_t</a> * </td>
<td class="paramname"><em>pos</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Request a new transport position.</p>
<p>May be called at any time by any client. The new position takes effect in two process cycles. If there are <a class="el" href="transport-design.html#slowsyncclients">slow-sync clients</a> and the transport is already rolling, it will enter the <a class="el" href="transport_8h.html#a66e50952a88eb087867922bfe3d0bd72a8c1e22fce8ef6c18baf7a5c6a69060ac">JackTransportStarting</a> state and begin invoking their <em>sync_callbacks</em> until ready. This function is realtime-safe.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__TransportControl.html#gab3f52a42084aead87fd1ee75ed25b240">jack_transport_locate</a>, <a class="el" href="group__TransportControl.html#gae53f7ac54804d2896d51b6ad599fa93c">jack_set_sync_callback</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">client</td><td>the JACK client structure. </td></tr>
<tr><td class="paramname">pos</td><td>requested new transport position. Fill pos->valid to specify which fields should be taken into account. If you mark a set of fields as valid, you are expected to fill them all.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 if valid request, EINVAL if position structure rejected. </dd></dl>
</div>
</div>
<a id="gab7b158bec8f27c03da29795f142d1caf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab7b158bec8f27c03da29795f142d1caf">◆ </a></span>jack_transport_start()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void jack_transport_start </td>
<td>(</td>
<td class="paramtype"><a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> * </td>
<td class="paramname"><em>client</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Start the JACK transport rolling.</p>
<p>Any client can make this request at any time. It takes effect no sooner than the next process cycle, perhaps later if there are <a class="el" href="transport-design.html#slowsyncclients">slow-sync clients</a>. This function is realtime-safe.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__TransportControl.html#gae53f7ac54804d2896d51b6ad599fa93c">jack_set_sync_callback</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">client</td><td>the JACK client structure. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ga6be6637c314bd88344826e9bcc1957b0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6be6637c314bd88344826e9bcc1957b0">◆ </a></span>jack_transport_stop()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void jack_transport_stop </td>
<td>(</td>
<td class="paramtype"><a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> * </td>
<td class="paramname"><em>client</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Stop the JACK transport.</p>
<p>Any client can make this request at any time. It takes effect on the next process cycle. This function is realtime-safe.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">client</td><td>the JACK client structure. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>