summaryrefslogtreecommitdiff
path: root/manuals/chickadee/The-Listener.html
blob: a6f5ab3c8d77d6654712bdf1a4fe477c434128a8 (plain)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!--  Copyright (C) 2017-2023  David Thompson dthompson2@worcester.edu

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".

A copy of the license is also available from the Free Software
Foundation Web site at http://www.gnu.org/licenses/fdl.html.


* Chickadee: (chickadee).     Game programming toolkit for Guile.

The document was typeset with
http://www.texinfo.org/ (GNU Texinfo).
  -->
<!--  Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/  -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The Listener (The Chickadee Game Toolkit)</title>

<meta name="description" content="The Listener (The Chickadee Game Toolkit)" />
<meta name="keywords" content="The Listener (The Chickadee Game Toolkit)" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="Generator" content="makeinfo" />
<link href="index.html" rel="start" title="Top" />
<link href="Index.html" rel="index" title="Index" />
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents" />
<link href="Audio.html" rel="up" title="Audio" />
<link href="The-Environment.html" rel="next" title="The Environment" />
<link href="Sources.html" rel="prev" title="Sources" />
<style type="text/css">
&lt;!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
@media (min-width: 1140px) {
    body {
        margin-left: 14rem;
        margin-right: 4rem;
        max-width: 52rem;
    }
}

@media (min-width: 800px) and (max-width: 1140px) {
    body {
        margin-left: 6rem;
        margin-right: 4rem;
        max-width: 52rem;
    }
}

@media (max-width: 800px) {
    body {
        margin: 1rem;
    }
}

--&gt;
</style>
<link rel="stylesheet" type="text/css" href="https://dthompson.us/css/dthompson.css" />


</head>

<body lang="en">
<span id="The-Listener"></span><div class="header">
<p>
Next: <a href="The-Environment.html" accesskey="n" rel="next">The Environment</a>, Previous: <a href="Sources.html" accesskey="p" rel="prev">Sources</a>, Up: <a href="Audio.html" accesskey="u" rel="up">Audio</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr />
<span id="The-Listener-1"></span><h4 class="subsection">5.4.3 The Listener</h4>

<p>The listener is a collection of global state that represents the
player within the 3D sound model.  For games that do not need 3D sound
modeling, manipulating the listener&rsquo;s master volume is the only
interesting thing to do here.
</p>
<dl>
<dt id="index-listener_002dvolume">Procedure: <strong>listener-volume</strong></dt>
<dd><p>Return the current master volume of the listener.
</p></dd></dl>

<dl>
<dt id="index-listener_002dposition">Procedure: <strong>listener-position</strong></dt>
<dd><p>Return the current position of the listener.
</p></dd></dl>

<dl>
<dt id="index-listener_002dvelocity">Procedure: <strong>listener-velocity</strong></dt>
<dd><p>Return the current velocity of the listener.
</p></dd></dl>

<dl>
<dt id="index-listener_002dorientation">Procedure: <strong>listener-orientation</strong></dt>
<dd><p>Return the current orientation of the listener.
</p></dd></dl>

<dl>
<dt id="index-set_002dlistener_002dvolume_0021">Procedure: <strong>set-listener-volume!</strong> <em>volume</em></dt>
<dd><p>Set the listener&rsquo;s master volume to <var>volume</var>, a value in the range [0,
1].
</p></dd></dl>

<dl>
<dt id="index-set_002dlistener_002dposition_0021">Procedure: <strong>set-listener-position!</strong> <em>position</em></dt>
<dd><p>Set the listener&rsquo;s position to the 3D vector <var>position</var>.
</p></dd></dl>

<dl>
<dt id="index-set_002dlistener_002dvelocity_0021">Procedure: <strong>set-listener-velocity!</strong> <em>velocity</em></dt>
<dd><p>Set the listener&rsquo;s velocity to the 3D vector <var>velocity</var>.
</p></dd></dl>

<dl>
<dt id="index-set_002dlistener_002dorientation_0021">Procedure: <strong>set-listener-orientation!</strong> <em>at up</em></dt>
<dd><p>Set the listener&rsquo;s orientation to the 3D vectors <var>at</var> and
<var>up</var>.
</p></dd></dl>




</body>
</html>