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
|
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE chapter>
<!-- Copyright (C) 2005-2018 Jo\u00EBl Kr\u00E4hemann -->
<!-- Permission is granted to copy, distribute and/or modify this document -->
<!-- under the terms of the GNU Free Documentation License, Version 1.3 -->
<!-- or any later version published by the Free Software Foundation; -->
<!-- with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. -->
<!-- A copy of the license is included in the section entitled "GNU -->
<!-- Free Documentation License". -->
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude" version="5.0">
<title>Thread-safe audio ports</title>
<para>
The AgsPort object provides you a well defined API to safe read or write
data to the AgsPort. Its access is protected by mutices. All actions on
ports shall happen through ::safe-read, ::safe-write, ::safe-get-property or
::safe-set-property.
</para>
<para>
AgsPort can contain various data types. But of only one type at the time.
Automation happens by adjusting ports and perhaps even applying an
AgsConversion. Further it contains some meta-information about plugin name
and port specifier.
</para>
<sect1>
<title>Get and set values</title>
<para>
You can achieve this by using GValue like:
</para>
<programlisting language="C">
<xi:include href="../listings/port.c" parse="text" />
</programlisting>
</sect1>
</chapter>
|