<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >OpenAL Audio Bindings</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="PHP 手册" HREF="index.html"><LINK REL="UP" TITLE="函数参考" HREF="funcref.html"><LINK REL="PREVIOUS" TITLE="Usage" HREF="oggvorbis.usage.html"><LINK REL="NEXT" TITLE="openal_buffer_create" HREF="function.openal-buffer-create.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></HEAD ><BODY CLASS="reference" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP 手册</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="oggvorbis.usage.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.openal-buffer-create.html" ACCESSKEY="N" >下一页</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="reference" ><A NAME="ref.openal" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" >CXI. OpenAL Audio Bindings</H1 ><DIV CLASS="PARTINTRO" ><A NAME="AEN162089" ></A ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="openal.intro" >简介</A ></H1 ><P > Platform independent audio bindings. Requires the <A HREF="http://www.openal.org/" TARGET="_top" >OpenAL library</A >. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="openal.installation" >安装</A ></H1 ><P > 本 <A HREF="http://pecl.php.net" TARGET="_top" >PECL</A > 扩展未绑定于 PHP 中。 </P ><P > 安装此 PECL 扩展库的信息可在手册中标题为 <A HREF="install.pecl.html" >PECL 扩展库安装</A >的一章中找到。 更多信息如新版本,下载,源文件,维护者信息以及更新日志等可以在这里找到: <A HREF="http://pecl.php.net/package/openal" TARGET="_top" >http://pecl.php.net/package/openal</A >. </P ><P > 可以从 <A HREF="http://www.php.net/downloads.php" TARGET="_top" >PHP 下载页面</A >或者 <A HREF="http://snaps.php.net/" TARGET="_top" >http://snaps.php.net/</A > 下载此 <ACRONYM CLASS="acronym" >PECL</ACRONYM > 扩展的 <ACRONYM CLASS="acronym" >DLL</ACRONYM > 文件。 </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="openal.configuration" >运行时配置</A ></H1 ><P >本扩展模块在 <TT CLASS="filename" >php.ini</TT > 中未定义任何配置选项。</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="openal.resources" >资源类型</A ></H1 ><P > This extension defines four resource types: <SPAN CLASS="emphasis" ><I CLASS="emphasis" >Open AL(Device)</I ></SPAN > - Returned by <A HREF="function.openal-device-open.html" ><B CLASS="function" >openal_device_open()</B ></A >, <SPAN CLASS="emphasis" ><I CLASS="emphasis" >Open AL(Context)</I ></SPAN > - Returned by <A HREF="function.openal-context-create.html" ><B CLASS="function" >openal_context_create()</B ></A >, <SPAN CLASS="emphasis" ><I CLASS="emphasis" >Open AL(Buffer)</I ></SPAN > - Returned by <A HREF="function.openal-buffer-create.html" ><B CLASS="function" >openal_buffer_create()</B ></A >, and <SPAN CLASS="emphasis" ><I CLASS="emphasis" >Open AL(Source)</I ></SPAN > - Returned by <A HREF="function.openal-source-create.html" ><B CLASS="function" >openal_source_create()</B ></A >. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="openal.constants" >预定义常量</A ></H1 ><P >以下常量由本扩展模块定义,因此只有在本扩展模块被编译到 PHP 中,或者在运行时被动态加载后才有效。</P ><P ></P ><DIV CLASS="variablelist" ><DL ><DT ><TT CLASS="constant" ><B >ALC_FREQUENCY</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Context Attribute </P ></DD ><DT ><TT CLASS="constant" ><B >ALC_REFRESH</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Context Attribute </P ></DD ><DT ><TT CLASS="constant" ><B >ALC_SYNC</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Context Attribute </P ></DD ><DT ><TT CLASS="constant" ><B >AL_FREQUENCY</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Buffer Setting </P ></DD ><DT ><TT CLASS="constant" ><B >AL_BITS</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Buffer Setting </P ></DD ><DT ><TT CLASS="constant" ><B >AL_CHANNELS</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Buffer Setting </P ></DD ><DT ><TT CLASS="constant" ><B >AL_SIZE</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Buffer Setting </P ></DD ><DT ><TT CLASS="constant" ><B >AL_BUFFER</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Source/Listener Setting (Integer) </P ></DD ><DT ><TT CLASS="constant" ><B >AL_SOURCE_RELATIVE</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Source/Listener Setting (Integer) </P ></DD ><DT ><TT CLASS="constant" ><B >AL_SOURCE_STATE</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Source/Listener Setting (Integer) </P ></DD ><DT ><TT CLASS="constant" ><B >AL_PITCH</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Source/Listener Setting (Float) </P ></DD ><DT ><TT CLASS="constant" ><B >AL_GAIN</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Source/Listener Setting (Float) </P ></DD ><DT ><TT CLASS="constant" ><B >AL_MIN_GAIN</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Source/Listener Setting (Float) </P ></DD ><DT ><TT CLASS="constant" ><B >AL_MAX_GAIN</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Source/Listener Setting (Float) </P ></DD ><DT ><TT CLASS="constant" ><B >AL_MAX_DISTANCE</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Source/Listener Setting (Float) </P ></DD ><DT ><TT CLASS="constant" ><B >AL_ROLLOFF_FACTOR</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Source/Listener Setting (Float) </P ></DD ><DT ><TT CLASS="constant" ><B >AL_CONE_OUTER_GAIN</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Source/Listener Setting (Float) </P ></DD ><DT ><TT CLASS="constant" ><B >AL_CONE_INNER_ANGLE</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Source/Listener Setting (Float) </P ></DD ><DT ><TT CLASS="constant" ><B >AL_CONE_OUTER_ANGLE</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Source/Listener Setting (Float) </P ></DD ><DT ><TT CLASS="constant" ><B >AL_REFERENCE_DISTANCE</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Source/Listener Setting (Float) </P ></DD ><DT ><TT CLASS="constant" ><B >AL_POSITION</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Source/Listener Setting (Float Vector) </P ></DD ><DT ><TT CLASS="constant" ><B >AL_VELOCITY</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Source/Listener Setting (Float Vector) </P ></DD ><DT ><TT CLASS="constant" ><B >AL_DIRECTION</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Source/Listener Setting (Float Vector) </P ></DD ><DT ><TT CLASS="constant" ><B >AL_ORIENTATION</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Source/Listener Setting (Float Vector) </P ></DD ><DT ><TT CLASS="constant" ><B >AL_FORMAT_MONO8</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > PCM Format </P ></DD ><DT ><TT CLASS="constant" ><B >AL_FORMAT_MONO16</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > PCM Format </P ></DD ><DT ><TT CLASS="constant" ><B >AL_FORMAT_STEREO8</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > PCM Format </P ></DD ><DT ><TT CLASS="constant" ><B >AL_FORMAT_STEREO16</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > PCM Format </P ></DD ><DT ><TT CLASS="constant" ><B >AL_INITIAL</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Source State </P ></DD ><DT ><TT CLASS="constant" ><B >AL_PLAYING</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Source State </P ></DD ><DT ><TT CLASS="constant" ><B >AL_PAUSED</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Source State </P ></DD ><DT ><TT CLASS="constant" ><B >AL_STOPPED</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Source State </P ></DD ><DT ><TT CLASS="constant" ><B >AL_LOOPING</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Source State </P ></DD ><DT ><TT CLASS="constant" ><B >AL_TRUE</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Boolean value recognized by OpenAL </P ></DD ><DT ><TT CLASS="constant" ><B >AL_FALSE</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Boolean value recognized by OpenAL </P ></DD ></DL ></DIV ></DIV ></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >目录</B ></DT ><DT ><A HREF="function.openal-buffer-create.html" >openal_buffer_create</A > -- Generate OpenAL buffer </DT ><DT ><A HREF="function.openal-buffer-data.html" >openal_buffer_data</A > -- Load a buffer with data </DT ><DT ><A HREF="function.openal-buffer-destroy.html" >openal_buffer_destroy</A > -- Destroys an OpenAL buffer </DT ><DT ><A HREF="function.openal-buffer-get.html" >openal_buffer_get</A > -- Retrieve an OpenAL buffer property </DT ><DT ><A HREF="function.openal-buffer-loadwav.html" >openal_buffer_loadwav</A > -- Load a .wav file into a buffer </DT ><DT ><A HREF="function.openal-context-create.html" >openal_context_create</A > -- Create an audio processing context </DT ><DT ><A HREF="function.openal-context-current.html" >openal_context_current</A > -- Make the specified context current </DT ><DT ><A HREF="function.openal-context-destroy.html" >openal_context_destroy</A > -- Destroys a context </DT ><DT ><A HREF="function.openal-context-process.html" >openal_context_process</A > -- Process the specified context </DT ><DT ><A HREF="function.openal-context-suspend.html" >openal_context_suspend</A > -- Suspend the specified context </DT ><DT ><A HREF="function.openal-device-close.html" >openal_device_close</A > -- Close an OpenAL device </DT ><DT ><A HREF="function.openal-device-open.html" >openal_device_open</A > -- Initialize the OpenAL audio layer </DT ><DT ><A HREF="function.openal-listener-get.html" >openal_listener_get</A > -- Retrieve a listener property </DT ><DT ><A HREF="function.openal-listener-set.html" >openal_listener_set</A > -- Set a listener property </DT ><DT ><A HREF="function.openal-source-create.html" >openal_source_create</A > -- Generate a source resource </DT ><DT ><A HREF="function.openal-source-destroy.html" >openal_source_destroy</A > -- Destroy a source resource </DT ><DT ><A HREF="function.openal-source-get.html" >openal_source_get</A > -- Retrieve an OpenAL source property </DT ><DT ><A HREF="function.openal-source-pause.html" >openal_source_pause</A > -- Pause the source </DT ><DT ><A HREF="function.openal-source-play.html" >openal_source_play</A > -- Start playing the source </DT ><DT ><A HREF="function.openal-source-rewind.html" >openal_source_rewind</A > -- Rewind the source </DT ><DT ><A HREF="function.openal-source-set.html" >openal_source_set</A > -- Set source property </DT ><DT ><A HREF="function.openal-source-stop.html" >openal_source_stop</A > -- Stop playing the source </DT ><DT ><A HREF="function.openal-stream.html" >openal_stream</A > -- Begin streaming on a source </DT ></DL ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="oggvorbis.usage.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >起始页</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.openal-buffer-create.html" ACCESSKEY="N" >下一页</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Usage</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="funcref.html" ACCESSKEY="U" >上一级</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >openal_buffer_create</TD ></TR ></TABLE ></DIV ></BODY ></HTML >