File: chap7.xml

package info (click to toggle)
gsequencer 8.2.9-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 74,272 kB
  • sloc: ansic: 1,195,333; xml: 31,048; cpp: 9,749; sh: 5,798; makefile: 4,024; perl: 536; sed: 16; python: 11
file content (64 lines) | stat: -rw-r--r-- 2,810 bytes parent folder | download | duplicates (3)
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
<?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>The recycling tree</title>
  <para>
    AgsRecycling has a strong relation to AgsChannel although not every channel might
    have its very own recycling. Rather having a reference to a start and end region
    of an inter-connnected AgsRecycling. It may create or destroy audio signals event
    based.
  </para>

  <para>
    Inter-connected gets its meaning as <code language="C">void ags_channel_set_recycling(AgsChannel*, AgsRecycling*, AgsRecycling*, gboolean, gboolean)</code>
    invoked by <code language="C">void ags_channel_set_link(AgsChannel*, AgsChannel*, GError**)</code>
    connects AgsRecycling:next and AgsRecycling:prev together from different channels. Providing
    you the AgsRecyclingContext. A recycling context has generally one parent and many
    children from different channels.
  </para>

  <para>
    AgsRecallID points to one recycling context in order to make decisions of what
    level you are running in. Theoretically super-threaded tree can run upto the
    recycling context level.
  </para>

  <para>
    Note, recyclings have they own recall base object AgsRecallRecycling. Usually, you
    do <code language="C">void ags_recall_add_child(AgsRecall*, AgsRecall*)</code> to
    instances inherit of AgsRecallChannelRun.
  </para>
  
  <sect1>
    <title>Add and remove audio signal</title>
    <para>
      The two signals ::add_audio_signal and ::remove_audio_signal should be invoked
      as adding or removing AgsAudioSignal to an AgsRecycling. Recalls act as producer
      or consumer of AgsAudioSignal. They do basically play notation or process your
      effects. Its are located in AgsAudio or AgsChannel.
    </para>

    <para>
      There is generally a need for providing a template audio signal within your recycling.
      As this does this example. This reduces the overhead of reading files for every
      playing during a button click, notation or pattern.
    </para>

    <example>
      <title>AgsRecycling and AgsAudioSignal</title>
      <programlisting language="C">
<xi:include href="../listings/recycling.c" parse="text" />
      </programlisting>
    </example>
  </sect1>
</chapter>