📄 audiodevice3d.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Sun Jun 23 01:50:12 PDT 2002 --><TITLE>AudioDevice3D (Java 3D API)</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><SCRIPT>function asd(){parent.document.title="AudioDevice3D (Java 3D API)";}</SCRIPT><BODY BGCOLOR="white" onload="asd();"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/media/j3d/AudioDevice.html"><B>PREV CLASS</B></A> <A HREF="../../../javax/media/j3d/AudioDevice3DL2.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="AudioDevice3D.html" TARGET="_top"><B>NO FRAMES</B></A> <SCRIPT> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT><A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.media.j3d</FONT><BR>Interface AudioDevice3D</H2><DL><DT><B>All Superinterfaces:</B> <DD><A HREF="../../../javax/media/j3d/AudioDevice.html">AudioDevice</A></DD></DL><DL><DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../javax/media/j3d/AudioDevice3DL2.html">AudioDevice3DL2</A></DD></DL><HR><DL><DT>public interface <B>AudioDevice3D</B><DT>extends <A HREF="../../../javax/media/j3d/AudioDevice.html">AudioDevice</A></DL><P>The AudioDevice3D class defines a 3D audio device that is used to set sound and aural attributes.<P> After the application chooses the AudioDevice3D that Java3D sound is to be rendered on, the Java 3D Sound Scheduler will call these methods for all active sounds to render them on the audio device.<P> The intent is for this interface to be implemented by AudioDevice Driver developers using a software or hardware sound engine of their choice.<P> Methods in this interface provide the Java3D Core a generic way to set and query the audio device the application has chosen audio rendering to be performed on. Methods in this interface include: <UL> Set up and clear the sound as a sample on the device. <P> Start, stop, pause, unpause, mute, and unmute of sample on the device. <P> Set parameters for each sample corresponding to the fields in the Sound node. <P> Set the current active aural parameters that affect all positional samples. </UL> <P> Sound Types <P> Sound types match the Sound node classes defined for Java 3D core for BackgroundSound, PointSound, and ConeSound. The type of sound a sample is loaded as determines which methods affect it. <P> Sound Data Types <P> Samples can be processed as streaming or buffered data. Fully spatializing sound sources may require data to be buffered.<P><P><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice3D.html#BACKGROUND_SOUND">BACKGROUND_SOUND</A></B></CODE><BR> Specifies the sound type as background sound.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice3D.html#BUFFERED_AUDIO_DATA">BUFFERED_AUDIO_DATA</A></B></CODE><BR> Sound data specified as Buffered is copied by the AudioDevice driver implementation.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice3D.html#CONE_SOUND">CONE_SOUND</A></B></CODE><BR> Specifies the sound type as cone sound.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice3D.html#POINT_SOUND">POINT_SOUND</A></B></CODE><BR> Specifies the sound type as point sound.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice3D.html#STREAMING_AUDIO_DATA">STREAMING_AUDIO_DATA</A></B></CODE><BR> Sound data specified as Streaming is not copied by the AudioDevice driver implementation.</TD></TR></TABLE> <A NAME="fields_inherited_from_class_javax.media.j3d.AudioDevice"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface javax.media.j3d.<A HREF="../../../javax/media/j3d/AudioDevice.html">AudioDevice</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/media/j3d/AudioDevice.html#HEADPHONES">HEADPHONES</A>, <A HREF="../../../javax/media/j3d/AudioDevice.html#MONO_SPEAKER">MONO_SPEAKER</A>, <A HREF="../../../javax/media/j3d/AudioDevice.html#STEREO_SPEAKERS">STEREO_SPEAKERS</A></CODE></TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice3D.html#clearSound(int)">clearSound</A></B>(int index)</CODE><BR> Requests that the AudioDevice free all resources associated with sample with index id.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice3D.html#getNumberOfChannelsUsed(int)">getNumberOfChannelsUsed</A></B>(int index)</CODE><BR> Retrieves the number of channels (on executing audio device) that this sound is using, if it is playing, or is expected to use if it were begun to be played.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice3D.html#getNumberOfChannelsUsed(int, boolean)">getNumberOfChannelsUsed</A></B>(int index, boolean muted)</CODE><BR> Retrieves the number of channels (on executing audio device) that this sound is using, if it is playing, or is projected to use if it were to be started playing.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice3D.html#getSampleDuration(int)">getSampleDuration</A></B>(int index)</CODE><BR> Returns the duration in milliseconds of the sound sample, if this information can be determined.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice3D.html#getStartTime(int)">getStartTime</A></B>(int index)</CODE><BR> Returns the system time of when the sound was last "started".</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice3D.html#muteSample(int)">muteSample</A></B>(int index)</CODE><BR> Makes the sample 'play silently'.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice3D.html#pauseSample(int)">pauseSample</A></B>(int index)</CODE><BR> Temporarily stops a cached sample from playing without resetting the sample's current pointer back to the beginning of the sound data so that it can be unpaused at a later time from the same location in the sample when the pause was initiated.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice3D.html#prepareSound(int, javax.media.j3d.MediaContainer)">prepareSound</A></B>(int soundType, <A HREF="../../../javax/media/j3d/MediaContainer.html">MediaContainer</A> soundData)</CODE><BR> Accepts a reference to the MediaContainer which contains a reference to sound data and information about the type of data it is.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice3D.html#setAngularAttenuation(int, int, double[], float[], float[])">setAngularAttenuation</A></B>(int index, int filterType, double[] angle, float[] attenuationScaleFactor, float[] filterCutoff)</CODE><BR> Sets this sound's angular gain attenuation (including filter) by defining corresponding arrays containing angular offsets from the sound's axis, gain scale factors, and frequency cutoff applied to all active directional sounds.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice3D.html#setDirection(int, javax.vecmath.Vector3d)">setDirection</A></B>(int index, <A HREF="../../../javax/vecmath/Vector3d.html">Vector3d</A> direction)</CODE><BR> Sets this sound's direction from the local coordinate vector provided.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice3D.html#setDistanceFilter(int, double[], float[])">setDistanceFilter</A></B>(int filterType, double[] distance, float[] filterCutoff)</CODE><BR> Sets Distance Filter corresponding arrays containing distances and frequency cutoff applied to all active positional sounds.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice3D.html#setDistanceGain(int, double[], float[], double[], float[])">setDistanceGain</A></B>(int index, double[] frontDistance, float[] frontAttenuationScaleFactor, double[] backDistance, float[] backAttenuationScaleFactor)</CODE><BR> Sets this sound's distance gain elliptical attenuation (not including filter cutoff frequency) by defining corresponding
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -