/usr/share/gtk-doc/html/libinstpatch/IpatchSampleData.html is in libinstpatch-doc 1.0.0-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>IpatchSampleData</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
<link rel="home" href="index.html" title="libinstpatch Reference Manual">
<link rel="up" href="ch03.html" title="Sample data objects and functions">
<link rel="prev" href="IpatchSample.html" title="IpatchSample">
<link rel="next" href="IpatchSampleStore.html" title="IpatchSampleStore">
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="ch01.html" title="Base objects and functions">
<link rel="chapter" href="ch02.html" title="Utility objects and functions">
<link rel="chapter" href="ch03.html" title="Sample data objects and functions">
<link rel="chapter" href="ch04.html" title="DLS patches">
<link rel="chapter" href="ch05.html" title="SoundFont patches">
<link rel="chapter" href="ch06.html" title="GigaSampler patches">
<link rel="chapter" href="ch07.html" title="Virtual banks">
<link rel="chapter" href="object-tree.html" title="Object Hierarchy">
<link rel="index" href="api-index-full.html" title="API Index">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="IpatchSample.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch03.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libinstpatch Reference Manual</th>
<td><a accesskey="n" href="IpatchSampleStore.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#IpatchSampleData.synopsis" class="shortcut">Top</a>
|
<a href="#IpatchSampleData.description" class="shortcut">Description</a>
|
<a href="#IpatchSampleData.object-hierarchy" class="shortcut">Object Hierarchy</a>
|
<a href="#IpatchSampleData.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
</td></tr>
</table>
<div class="refentry" title="IpatchSampleData">
<a name="IpatchSampleData"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="IpatchSampleData.top_of_page"></a>IpatchSampleData</span></h2>
<p>IpatchSampleData — Sample data proxy object.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1" title="Stability Level">
<a name="IpatchSampleData.stability-level"></a><h2>Stability Level</h2>
Stable, unless otherwise indicated
</div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="IpatchSampleData.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
<a
href="../libinstpatch/IpatchSampleData.html#IpatchSampleData-struct"
>IpatchSampleData</a>;
#define <a
href="../libinstpatch/IpatchSampleData.html#IPATCH-SAMPLE-DATA-UNUSED-FLAG-SHIFT--CAPS"
>IPATCH_SAMPLE_DATA_UNUSED_FLAG_SHIFT</a>
<a
href="../libinstpatch/IpatchList.html"
>IpatchList</a> * <a
href="../libinstpatch/IpatchSampleData.html#ipatch-get-sample-data-list"
>ipatch_get_sample_data_list</a> (void);
<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> * <a
href="../libinstpatch/IpatchSampleData.html#ipatch-sample-data-new"
>ipatch_sample_data_new</a> (void);
void <a
href="../libinstpatch/IpatchSampleData.html#ipatch-sample-data-add"
>ipatch_sample_data_add</a> (<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> *sampledata,
<a
href="../libinstpatch/IpatchSampleStore.html"
>IpatchSampleStore</a> *store);
void <a
href="../libinstpatch/IpatchSampleData.html#ipatch-sample-data-remove"
>ipatch_sample_data_remove</a> (<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> *sampledata,
<a
href="../libinstpatch/IpatchSampleStore.html"
>IpatchSampleStore</a> *store);
void <a
href="../libinstpatch/IpatchSampleData.html#ipatch-sample-data-replace-native-sample"
>ipatch_sample_data_replace_native_sample</a>
(<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> *sampledata,
<a
href="../libinstpatch/IpatchSampleStore.html"
>IpatchSampleStore</a> *store);
<a
href="../libinstpatch/IpatchList.html"
>IpatchList</a> * <a
href="../libinstpatch/IpatchSampleData.html#ipatch-sample-data-get-samples"
>ipatch_sample_data_get_samples</a> (<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> *sampledata);
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
>guint</a> <a
href="../libinstpatch/IpatchSampleData.html#ipatch-sample-data-get-size"
>ipatch_sample_data_get_size</a> (<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> *sampledata);
<a
href="../libinstpatch/IpatchSampleStore.html"
>IpatchSampleStore</a> * <a
href="../libinstpatch/IpatchSampleData.html#ipatch-sample-data-get-native-sample"
>ipatch_sample_data_get_native_sample</a>
(<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> *sampledata);
int <a
href="../libinstpatch/IpatchSampleData.html#ipatch-sample-data-get-native-format"
>ipatch_sample_data_get_native_format</a>
(<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> *sampledata);
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a> <a
href="../libinstpatch/IpatchSampleData.html#ipatch-sample-data-open-native-sample"
>ipatch_sample_data_open_native_sample</a>
(<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> *sampledata,
<a
href="../libinstpatch/IpatchSample.html#IpatchSampleHandle"
>IpatchSampleHandle</a> *handle,
char mode,
int format,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"
>guint32</a> channel_map,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
>GError</a> **err);
<a
href="../libinstpatch/IpatchSampleStore.html"
>IpatchSampleStore</a> * <a
href="../libinstpatch/IpatchSampleData.html#ipatch-sample-data-get-cache-sample"
>ipatch_sample_data_get_cache_sample</a> (<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> *sampledata,
int format,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"
>guint32</a> channel_map,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
>GError</a> **err);
<a
href="../libinstpatch/IpatchSampleStore.html"
>IpatchSampleStore</a> * <a
href="../libinstpatch/IpatchSampleData.html#ipatch-sample-data-lookup-cache-sample"
>ipatch_sample_data_lookup_cache_sample</a>
(<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> *sampledata,
int format,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"
>guint32</a> channel_map);
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a> <a
href="../libinstpatch/IpatchSampleData.html#ipatch-sample-data-open-cache-sample"
>ipatch_sample_data_open_cache_sample</a>
(<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> *sampledata,
<a
href="../libinstpatch/IpatchSample.html#IpatchSampleHandle"
>IpatchSampleHandle</a> *handle,
int format,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"
>guint32</a> channel_map,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
>GError</a> **err);
void <a
href="../libinstpatch/IpatchSampleData.html#ipatch-sample-cache-clean"
>ipatch_sample_cache_clean</a> (<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint64"
>guint64</a> max_unused_size,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
>guint</a> max_unused_age);
<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> * <a
href="../libinstpatch/IpatchSampleData.html#ipatch-sample-data-get-blank"
>ipatch_sample_data_get_blank</a> (void);
</pre>
</div>
<div class="refsect1" title="Object Hierarchy">
<a name="IpatchSampleData.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
<a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
+----<a
href="../libinstpatch/IpatchItem.html"
>IpatchItem</a>
+----IpatchSampleData
</pre>
</div>
<div class="refsect1" title="Implemented Interfaces">
<a name="IpatchSampleData.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
IpatchSampleData implements
<a
href="../libinstpatch/IpatchSample.html"
>IpatchSample</a>.</p>
</div>
<div class="refsect1" title="Description">
<a name="IpatchSampleData.description"></a><h2>Description</h2>
<p>
An object which acts as a proxy for sample data and one or more cached
versions of the same audio but potentially differing in sample format
and/or storage media. <a
href="../libinstpatch/IpatchSampleStore.html"
><span class="type">IpatchSampleStore</span></a> is used instead of the
<a
href="../libinstpatch/IpatchSample.html"
><span class="type">IpatchSample</span></a> interface, for increased performance.</p>
</div>
<div class="refsect1" title="Details">
<a name="IpatchSampleData.details"></a><h2>Details</h2>
<div class="refsect2" title="IpatchSampleData">
<a name="IpatchSampleData-struct"></a><h3>IpatchSampleData</h3>
<pre class="programlisting">typedef struct _IpatchSampleData IpatchSampleData;</pre>
</div>
<hr>
<div class="refsect2" title="IPATCH_SAMPLE_DATA_UNUSED_FLAG_SHIFT">
<a name="IPATCH-SAMPLE-DATA-UNUSED-FLAG-SHIFT--CAPS"></a><h3>IPATCH_SAMPLE_DATA_UNUSED_FLAG_SHIFT</h3>
<pre class="programlisting">#define IPATCH_SAMPLE_DATA_UNUSED_FLAG_SHIFT</pre>
</div>
<hr>
<div class="refsect2" title="ipatch_get_sample_data_list ()">
<a name="ipatch-get-sample-data-list"></a><h3>ipatch_get_sample_data_list ()</h3>
<pre class="programlisting"><a
href="../libinstpatch/IpatchList.html"
>IpatchList</a> * ipatch_get_sample_data_list (void);</pre>
<p>
Creates an object list copy of the master sample data list (all
existing sample data objects).</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> New object list populated with all <a
href="../libinstpatch/IpatchSampleData.html"
><span class="type">IpatchSampleData</span></a> objects
with a reference count of 1 which the caller owns, removing the reference
will free the list.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="ipatch_sample_data_new ()">
<a name="ipatch-sample-data-new"></a><h3>ipatch_sample_data_new ()</h3>
<pre class="programlisting"><a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> * ipatch_sample_data_new (void);</pre>
<p>
Create a new sample data object.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> New sample data with a reference count of 1. Caller owns
the reference and removing it will destroy the item, unless another
reference is added (if its parented for example).
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="ipatch_sample_data_add ()">
<a name="ipatch-sample-data-add"></a><h3>ipatch_sample_data_add ()</h3>
<pre class="programlisting">void ipatch_sample_data_add (<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> *sampledata,
<a
href="../libinstpatch/IpatchSampleStore.html"
>IpatchSampleStore</a> *store);</pre>
<p>
Add a sample to a sample data object. If no samples have yet been added,
then the added sample becomes the native sample. All samples added to a
given <em class="parameter"><code>sampledata</code></em> object must have the same frame count and should also
have the same sample rate. This is not enforced though and is left to the
caller to ensure.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sampledata</code></em> :</span></p></td>
<td> Sample data object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>store</code></em> :</span></p></td>
<td> Sample store to add
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="ipatch_sample_data_remove ()">
<a name="ipatch-sample-data-remove"></a><h3>ipatch_sample_data_remove ()</h3>
<pre class="programlisting">void ipatch_sample_data_remove (<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> *sampledata,
<a
href="../libinstpatch/IpatchSampleStore.html"
>IpatchSampleStore</a> *store);</pre>
<p>
Remove a sample from a sample data object. The native sample should not
be removed from an active sample data object. Use
<a
href="../libinstpatch/IpatchSampleData.html#ipatch-sample-data-replace-native-sample"
><code class="function">ipatch_sample_data_replace_native_sample()</code></a> if replacement is desired.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sampledata</code></em> :</span></p></td>
<td> Sample data object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>store</code></em> :</span></p></td>
<td> Sample store to remove
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="ipatch_sample_data_replace_native_sample ()">
<a name="ipatch-sample-data-replace-native-sample"></a><h3>ipatch_sample_data_replace_native_sample ()</h3>
<pre class="programlisting">void ipatch_sample_data_replace_native_sample
(<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> *sampledata,
<a
href="../libinstpatch/IpatchSampleStore.html"
>IpatchSampleStore</a> *store);</pre>
<p>
Replace the native sample of a sample data object. This function can be used
even if there are no samples yet, in which case it behaves just like
<a
href="../libinstpatch/IpatchSampleData.html#ipatch-sample-data-add"
><code class="function">ipatch_sample_data_add()</code></a>.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sampledata</code></em> :</span></p></td>
<td> Sample data object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>store</code></em> :</span></p></td>
<td> Sample store object
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="ipatch_sample_data_get_samples ()">
<a name="ipatch-sample-data-get-samples"></a><h3>ipatch_sample_data_get_samples ()</h3>
<pre class="programlisting"><a
href="../libinstpatch/IpatchList.html"
>IpatchList</a> * ipatch_sample_data_get_samples (<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> *sampledata);</pre>
<p>
Get an object list of samples in a sample data object. The first sample is
the native sample.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sampledata</code></em> :</span></p></td>
<td> Sample data object
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Newly created list of <a
href="../libinstpatch/IpatchSampleStore.html"
><span class="type">IpatchSampleStore</span></a> objects with a refcount of
1 which the caller owns.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="ipatch_sample_data_get_size ()">
<a name="ipatch-sample-data-get-size"></a><h3>ipatch_sample_data_get_size ()</h3>
<pre class="programlisting"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
>guint</a> ipatch_sample_data_get_size (<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> *sampledata);</pre>
<p>
Get the size in frames of the samples in the <em class="parameter"><code>sampledata</code></em> object.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sampledata</code></em> :</span></p></td>
<td> Sample data to get size of
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Size in frames of stores in sample data.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="ipatch_sample_data_get_native_sample ()">
<a name="ipatch-sample-data-get-native-sample"></a><h3>ipatch_sample_data_get_native_sample ()</h3>
<pre class="programlisting"><a
href="../libinstpatch/IpatchSampleStore.html"
>IpatchSampleStore</a> * ipatch_sample_data_get_native_sample
(<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> *sampledata);</pre>
<p>
Get the native sample of a sample data object.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sampledata</code></em> :</span></p></td>
<td> Sample data object
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Native sample, or <code class="literal">NULL</code> if no native sample in the sample data object,
caller owns a reference.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="ipatch_sample_data_get_native_format ()">
<a name="ipatch-sample-data-get-native-format"></a><h3>ipatch_sample_data_get_native_format ()</h3>
<pre class="programlisting">int ipatch_sample_data_get_native_format
(<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> *sampledata);</pre>
<p>
Convenience function to get the sample format of the native sample in a
sample data object. See <a
href="../libinstpatch/IpatchSample.html#ipatch-sample-get-format"
><code class="function">ipatch_sample_get_format()</code></a> for more info.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sampledata</code></em> :</span></p></td>
<td> Sample data object
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Sample format or 0 if <em class="parameter"><code>sampledata</code></em> has no native sample.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="ipatch_sample_data_open_native_sample ()">
<a name="ipatch-sample-data-open-native-sample"></a><h3>ipatch_sample_data_open_native_sample ()</h3>
<pre class="programlisting"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a> ipatch_sample_data_open_native_sample
(<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> *sampledata,
<a
href="../libinstpatch/IpatchSample.html#IpatchSampleHandle"
>IpatchSampleHandle</a> *handle,
char mode,
int format,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"
>guint32</a> channel_map,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
>GError</a> **err);</pre>
<p>
A convenience function to open a handle to a <em class="parameter"><code>sampledata</code></em> object's native sample.
See <a
href="../libinstpatch/IpatchSample.html#ipatch-sample-handle-open"
><code class="function">ipatch_sample_handle_open()</code></a> for more details. This is identical to calling
<a
href="../libinstpatch/IpatchSampleData.html#ipatch-sample-data-get-native-sample"
><code class="function">ipatch_sample_data_get_native_sample()</code></a> and then <a
href="../libinstpatch/IpatchSample.html#ipatch-sample-handle-open"
><code class="function">ipatch_sample_handle_open()</code></a> on
the returned sample.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sampledata</code></em> :</span></p></td>
<td> Sample data
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
<td> Caller supplied structure to initialize
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td> Access mode to sample, 'r' for reading and 'w' for writing
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
<td> Sample format to convert to/from (0 for no conversion or to assign
a transform object with <a
href="../libinstpatch/IpatchSample.html#ipatch-sample-handle-set-transform"
><code class="function">ipatch_sample_handle_set_transform()</code></a>).
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>channel_map</code></em> :</span></p></td>
<td> Channel mapping if <em class="parameter"><code>format</code></em> is set (set to 0 otherwise), use
<a
href="../libinstpatch/libinstpatch-sample.html#IPATCH-SAMPLE-UNITY-CHANNEL-MAP--CAPS"
><span class="type">IPATCH_SAMPLE_UNITY_CHANNEL_MAP</span></a> for 1 to 1 channel mapping
(see <a
href="../libinstpatch/libinstpatch-sample.html#ipatch-sample-get-transform-funcs"
><code class="function">ipatch_sample_get_transform_funcs()</code></a> for details).
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>err</code></em> :</span></p></td>
<td> Location to store error information
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <code class="literal">TRUE</code> on success, <code class="literal">FALSE</code> on failure (in which case <em class="parameter"><code>err</code></em> may be set)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="ipatch_sample_data_get_cache_sample ()">
<a name="ipatch-sample-data-get-cache-sample"></a><h3>ipatch_sample_data_get_cache_sample ()</h3>
<pre class="programlisting"><a
href="../libinstpatch/IpatchSampleStore.html"
>IpatchSampleStore</a> * ipatch_sample_data_get_cache_sample (<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> *sampledata,
int format,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"
>guint32</a> channel_map,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
>GError</a> **err);</pre>
<p>
Get a cached version, in RAM, of a sample. If an existing cached sample
already exists with the given format and channel map, it is used. Otherwise
a new <a
href="../libinstpatch/IpatchSampleStoreCache.html"
><span class="type">IpatchSampleStoreCache</span></a> sample is created and the native sample is
converted as necessary. If a matching cached sample is currently being
created by another thread, this function will block until it is created and
return it.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sampledata</code></em> :</span></p></td>
<td> Sample data object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
<td> Sample format of cached sample to convert native sample to
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>channel_map</code></em> :</span></p></td>
<td> Channel mapping to use for new cached sample when converting
from native format, use <a
href="../libinstpatch/libinstpatch-sample.html#IPATCH-SAMPLE-UNITY-CHANNEL-MAP--CAPS"
><span class="type">IPATCH_SAMPLE_UNITY_CHANNEL_MAP</span></a> for 1 to 1 channel
mapping (see <a
href="../libinstpatch/libinstpatch-sample.html#ipatch-sample-get-transform-funcs"
><code class="function">ipatch_sample_get_transform_funcs()</code></a> for details).
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>err</code></em> :</span></p></td>
<td> Location to store error information
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Cached sample with the given <em class="parameter"><code>format</code></em> for which the caller owns a
reference or <code class="literal">NULL</code> if <em class="parameter"><code>sampledata</code></em> contains no samples or a sample
conversion error occurred (I/O error for example).
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="ipatch_sample_data_lookup_cache_sample ()">
<a name="ipatch-sample-data-lookup-cache-sample"></a><h3>ipatch_sample_data_lookup_cache_sample ()</h3>
<pre class="programlisting"><a
href="../libinstpatch/IpatchSampleStore.html"
>IpatchSampleStore</a> * ipatch_sample_data_lookup_cache_sample
(<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> *sampledata,
int format,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"
>guint32</a> channel_map);</pre>
<p>
Like <a
href="../libinstpatch/IpatchSampleData.html#ipatch-sample-data-get-cache-sample"
><code class="function">ipatch_sample_data_get_cache_sample()</code></a> but does not create a new cache
sample if it doesn't exist.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sampledata</code></em> :</span></p></td>
<td> Sample data object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
<td> Sample format
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>channel_map</code></em> :</span></p></td>
<td> Channel mapping of cached sample relative to native sample format.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Cached sample store with the given <em class="parameter"><code>format</code></em> and <em class="parameter"><code>channel_map</code></em> for
which the caller owns a reference or <code class="literal">NULL</code> if <em class="parameter"><code>sampledata</code></em> does not contain
a matching cached sample.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="ipatch_sample_data_open_cache_sample ()">
<a name="ipatch-sample-data-open-cache-sample"></a><h3>ipatch_sample_data_open_cache_sample ()</h3>
<pre class="programlisting"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a> ipatch_sample_data_open_cache_sample
(<a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> *sampledata,
<a
href="../libinstpatch/IpatchSample.html#IpatchSampleHandle"
>IpatchSampleHandle</a> *handle,
int format,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"
>guint32</a> channel_map,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
>GError</a> **err);</pre>
<p>
Like <a
href="../libinstpatch/IpatchSampleData.html#ipatch-sample-data-get-cache-sample"
><code class="function">ipatch_sample_data_get_cache_sample()</code></a> but opens the resulting cached
sample as a convenience.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sampledata</code></em> :</span></p></td>
<td> Sample data object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
<td> Caller supplied sample handle to initialize
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
<td> Sample format
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>err</code></em> :</span></p></td>
<td> Location to store error information
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <code class="literal">TRUE</code> on success, <code class="literal">FALSE</code> otherwise (in which case <em class="parameter"><code>err</code></em> may be set).
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="ipatch_sample_cache_clean ()">
<a name="ipatch-sample-cache-clean"></a><h3>ipatch_sample_cache_clean ()</h3>
<pre class="programlisting">void ipatch_sample_cache_clean (<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint64"
>guint64</a> max_unused_size,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
>guint</a> max_unused_age);</pre>
</div>
<hr>
<div class="refsect2" title="ipatch_sample_data_get_blank ()">
<a name="ipatch-sample-data-get-blank"></a><h3>ipatch_sample_data_get_blank ()</h3>
<pre class="programlisting"><a
href="../libinstpatch/IpatchSampleData.html"
>IpatchSampleData</a> * ipatch_sample_data_get_blank (void);</pre>
<p>
Get blank sample data object. Return's a sample data structure
with the minimum amount of data which is blank. Only creates it on
the first call, subsequent calls return the same sample data
object. Therefore it should not be modified. The blank sample data's
reference count has been incremented and should be removed by the
caller with <a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"
><code class="function">g_object_unref()</code></a> when finished with it.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The blank sample data object. Remember to unref it when not
using it anymore with <a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"
><code class="function">g_object_unref()</code></a>.
</td>
</tr></tbody>
</table></div>
</div>
</div>
<div class="refsect1" title="See Also">
<a name="IpatchSampleData.see-also"></a><h2>See Also</h2>
#IpatchSampleStore
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.11</div>
</body>
</html>
|