uTools-Manuals/docs/php/openal_source_set.html
2019-04-08 23:22:26 +08:00

109 lines
4.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Set source property</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.openal-source-set" class="refentry">
<div class="refnamediv">
<h1 class="refname">openal_source_set</h1>
<p class="verinfo">(PECL openal &gt;= 0.1.0)</p><p class="refpurpose"><span class="refname">openal_source_set</span> &mdash; <span class="dc-title">
Set source property
</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.openal-source-set-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>openal_source_set</strong></span>
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$source</code></span>
, <span class="methodparam"><span class="type">int</span> <code class="parameter">$property</code></span>
, <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$setting</code></span>
) : <span class="type">bool</span></div>
</div>
<div class="refsect1 parameters" id="refsect1-function.openal-source-set-parameters">
<h3 class="title">参数</h3>
<dl>
<dt>
<code class="parameter">source</code></dt>
<dd>
<p class="para">
An <a href="openal.resources.html" class="link">Open AL(Source)</a> resource
(previously created by <span class="function"><a href="openal_source_create.html" class="function">openal_source_create()</a></span>).
</p>
</dd>
<dt>
<code class="parameter">property</code></dt>
<dd>
<p class="para">
Property to set, one of:
<strong><code>AL_BUFFER</code></strong> (OpenAL(Source)),
<strong><code>AL_LOOPING</code></strong> (bool),
<strong><code>AL_SOURCE_RELATIVE</code></strong> (int),
<strong><code>AL_SOURCE_STATE</code></strong> (int),
<strong><code>AL_PITCH</code></strong> (float),
<strong><code>AL_GAIN</code></strong> (float),
<strong><code>AL_MIN_GAIN</code></strong> (float),
<strong><code>AL_MAX_GAIN</code></strong> (float),
<strong><code>AL_MAX_DISTANCE</code></strong> (float),
<strong><code>AL_ROLLOFF_FACTOR</code></strong> (float),
<strong><code>AL_CONE_OUTER_GAIN</code></strong> (float),
<strong><code>AL_CONE_INNER_ANGLE</code></strong> (float),
<strong><code>AL_CONE_OUTER_ANGLE</code></strong> (float),
<strong><code>AL_REFERENCE_DISTANCE</code></strong> (float),
<strong><code>AL_POSITION</code></strong> (array(float,float,float)),
<strong><code>AL_VELOCITY</code></strong> (array(float,float,float)),
<strong><code>AL_DIRECTION</code></strong> (array(float,float,float)).
</p>
</dd>
<dt>
<code class="parameter">setting</code></dt>
<dd>
<p class="para">
Value to assign to specified <code class="parameter">property</code>.
Refer to the description of <code class="parameter">property</code>
for a description of the value(s) expected.
</p>
</dd>
</dl>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.openal-source-set-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
成功时返回 <strong><code>TRUE</code></strong> 或者在失败时返回 <strong><code>FALSE</code></strong>
</p>
</div>
<div class="refsect1 seealso" id="refsect1-function.openal-source-set-seealso">
<h3 class="title">参见</h3>
<p class="para">
<ul class="simplelist">
<li class="member"><span class="function"><a href="openal_source_create.html" class="function" rel="rdfs-seeAlso">openal_source_create()</a> - Generate a source resource</span></li>
<li class="member"><span class="function"><a href="openal_source_get.html" class="function" rel="rdfs-seeAlso">openal_source_get()</a> - Retrieve an OpenAL source property</span></li>
<li class="member"><span class="function"><a href="openal_source_play.html" class="function" rel="rdfs-seeAlso">openal_source_play()</a> - Start playing the source</span></li>
</ul>
</p>
</div>
</div></div></div></body></html>