mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 05:26:57 +08:00
107 lines
3.4 KiB
HTML
107 lines
3.4 KiB
HTML
<!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>Load a buffer with data</title>
|
||
</head>
|
||
<body class="docs"><div id="layout">
|
||
<div id="layout-content"><div id="function.openal-buffer-data" class="refentry">
|
||
<div class="refnamediv">
|
||
<h1 class="refname">openal_buffer_data</h1>
|
||
<p class="verinfo">(PECL openal >= 0.1.0)</p><p class="refpurpose"><span class="refname">openal_buffer_data</span> — <span class="dc-title">
|
||
Load a buffer with data
|
||
</span></p>
|
||
|
||
</div>
|
||
<div class="refsect1 description" id="refsect1-function.openal-buffer-data-description">
|
||
<h3 class="title">说明</h3>
|
||
<div class="methodsynopsis dc-description">
|
||
<span class="methodname"><strong>openal_buffer_data</strong></span>
|
||
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$buffer</code></span>
|
||
, <span class="methodparam"><span class="type">int</span> <code class="parameter">$format</code></span>
|
||
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$data</code></span>
|
||
, <span class="methodparam"><span class="type">int</span> <code class="parameter">$freq</code></span>
|
||
) : <span class="type">bool</span></div>
|
||
|
||
</div>
|
||
|
||
<div class="refsect1 parameters" id="refsect1-function.openal-buffer-data-parameters">
|
||
<h3 class="title">参数</h3>
|
||
<dl>
|
||
|
||
|
||
<dt>
|
||
<code class="parameter">buffer</code></dt>
|
||
|
||
<dd>
|
||
|
||
<p class="para">
|
||
An <a href="openal.resources.html" class="link">Open AL(Buffer)</a> resource
|
||
(previously created by <span class="function"><a href="openal_buffer_create.html" class="function">openal_buffer_create()</a></span>).
|
||
</p>
|
||
</dd>
|
||
|
||
|
||
|
||
<dt>
|
||
<code class="parameter">format</code></dt>
|
||
|
||
<dd>
|
||
|
||
<p class="para">
|
||
Format of <code class="parameter">data</code>, one of:
|
||
<strong><code>AL_FORMAT_MONO8</code></strong>,
|
||
<strong><code>AL_FORMAT_MONO16</code></strong>,
|
||
<strong><code>AL_FORMAT_STEREO8</code></strong> 和
|
||
<strong><code>AL_FORMAT_STEREO16</code></strong>
|
||
</p>
|
||
</dd>
|
||
|
||
|
||
|
||
<dt>
|
||
<code class="parameter">data</code></dt>
|
||
|
||
<dd>
|
||
|
||
<p class="para">
|
||
Block of binary audio data in the <code class="parameter">format</code> and
|
||
<code class="parameter">freq</code> specified.
|
||
</p>
|
||
</dd>
|
||
|
||
|
||
|
||
<dt>
|
||
<code class="parameter">freq</code></dt>
|
||
|
||
<dd>
|
||
|
||
<p class="para">
|
||
Frequency of <code class="parameter">data</code> given in Hz.
|
||
</p>
|
||
</dd>
|
||
|
||
|
||
</dl>
|
||
|
||
</div>
|
||
|
||
<div class="refsect1 returnvalues" id="refsect1-function.openal-buffer-data-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-buffer-data-seealso">
|
||
<h3 class="title">参见</h3>
|
||
<p class="para">
|
||
<ul class="simplelist">
|
||
<li class="member"><span class="function"><a href="openal_buffer_loadwav.html" class="function" rel="rdfs-seeAlso">openal_buffer_loadwav()</a> - Load a .wav file into a buffer</span></li>
|
||
<li class="member"><span class="function"><a href="openal_stream.html" class="function" rel="rdfs-seeAlso">openal_stream()</a> - Begin streaming on a source</span></li>
|
||
</ul>
|
||
</p>
|
||
</div>
|
||
|
||
</div></div></div></body></html> |