📄 audiodevice3d.html
字号:
arrays containing distances from the sound's origin and gain scale factors 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#setFrequencyScaleFactor(float)">setFrequencyScaleFactor</A></B>(float frequencyScaleFactor)</CODE><BR> Specifies a scale factor applied to the frequency (or wavelength).</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#setLoop(int, int)">setLoop</A></B>(int index, int count)</CODE><BR> Sets a sound's loop count.</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#setPosition(int, javax.vecmath.Point3d)">setPosition</A></B>(int index, <A HREF="../../../javax/vecmath/Point3d.html">Point3d</A> position)</CODE><BR> Sets this sound's location (in Local coordinates) from specified Point.</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#setReflectionCoefficient(float)">setReflectionCoefficient</A></B>(float coefficient)</CODE><BR> Sets the Reflective Coefficient scale factor applied to distinct low-order early reflections of sound off the surfaces in the region defined by the current listening region.</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#setReverbDelay(float)">setReverbDelay</A></B>(float reverbDelay)</CODE><BR> Sets the reverberation delay time.</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#setReverbOrder(int)">setReverbOrder</A></B>(int reverbOrder)</CODE><BR> Sets the reverberation order of reflections.</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#setRolloff(float)">setRolloff</A></B>(float rolloff)</CODE><BR> Changes the speed of sound factor.</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#setSampleGain(int, float)">setSampleGain</A></B>(int index, float scaleFactor)</CODE><BR> Sets the overall gain scale factor applied to data associated with this source to increase or decrease its overall amplitude.</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#setVelocityScaleFactor(float)">setVelocityScaleFactor</A></B>(float velocityScaleFactor)</CODE><BR> Sets the Velocity scale factor applied during Doppler Effect calculation.</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#setView(javax.media.j3d.View)">setView</A></B>(<A HREF="../../../javax/media/j3d/View.html">View</A> reference)</CODE><BR> Accepts a reference to the current View.</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#setVworldXfrm(int, javax.media.j3d.Transform3D)">setVworldXfrm</A></B>(int index, <A HREF="../../../javax/media/j3d/Transform3D.html">Transform3D</A> trans)</CODE><BR> Passes a reference to the concatenated transformation to be applied to local sound position and direction parameters.</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#startSample(int)">startSample</A></B>(int index)</CODE><BR> Begins a sound playing on the AudioDevice.</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#stopSample(int)">stopSample</A></B>(int index)</CODE><BR> Stops the sound on the AudioDevice.</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#unmuteSample(int)">unmuteSample</A></B>(int index)</CODE><BR> Makes a silently playing sample audible.</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#unpauseSample(int)">unpauseSample</A></B>(int index)</CODE><BR> Restarts the paused sample from the location in the sample where paused.</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#updateSample(int)">updateSample</A></B>(int index)</CODE><BR> Explicitly updates a Sample.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_javax.media.j3d.AudioDevice"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods 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#close()">close</A>, <A HREF="../../../javax/media/j3d/AudioDevice.html#getAngleOffsetToSpeaker()">getAngleOffsetToSpeaker</A>, <A HREF="../../../javax/media/j3d/AudioDevice.html#getAudioPlaybackType()">getAudioPlaybackType</A>, <A HREF="../../../javax/media/j3d/AudioDevice.html#getCenterEarToSpeaker()">getCenterEarToSpeaker</A>, <A HREF="../../../javax/media/j3d/AudioDevice.html#getChannelsAvailable()">getChannelsAvailable</A>, <A HREF="../../../javax/media/j3d/AudioDevice.html#getChannelsUsedForSound(javax.media.j3d.Sound)">getChannelsUsedForSound</A>, <A HREF="../../../javax/media/j3d/AudioDevice.html#getTotalChannels()">getTotalChannels</A>, <A HREF="../../../javax/media/j3d/AudioDevice.html#initialize()">initialize</A>, <A HREF="../../../javax/media/j3d/AudioDevice.html#setAngleOffsetToSpeaker(float)">setAngleOffsetToSpeaker</A>, <A HREF="../../../javax/media/j3d/AudioDevice.html#setAudioPlaybackType(int)">setAudioPlaybackType</A>, <A HREF="../../../javax/media/j3d/AudioDevice.html#setCenterEarToSpeaker(float)">setCenterEarToSpeaker</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="BACKGROUND_SOUND"><!-- --></A><H3>BACKGROUND_SOUND</H3><PRE>public static final int <B>BACKGROUND_SOUND</B></PRE><DL><DD>Specifies the sound type as background sound.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.media.j3d.AudioDevice3D.BACKGROUND_SOUND">Constant Field Values</A></DL></DL><HR><A NAME="POINT_SOUND"><!-- --></A><H3>POINT_SOUND</H3><PRE>public static final int <B>POINT_SOUND</B></PRE><DL><DD>Specifies the sound type as point sound.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.media.j3d.AudioDevice3D.POINT_SOUND">Constant Field Values</A></DL></DL><HR><A NAME="CONE_SOUND"><!-- --></A><H3>CONE_SOUND</H3><PRE>public static final int <B>CONE_SOUND</B></PRE><DL><DD>Specifies the sound type as cone sound.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.media.j3d.AudioDevice3D.CONE_SOUND">Constant Field Values</A></DL></DL><HR><A NAME="STREAMING_AUDIO_DATA"><!-- --></A><H3>STREAMING_AUDIO_DATA</H3><PRE>public static final int <B>STREAMING_AUDIO_DATA</B></PRE><DL><DD>Sound data specified as Streaming is not copied by the AudioDevice driver implementation. It is up to the application to ensure that this data is continuously accessible during sound rendering. Furthermore, full sound spatialization may not be possible, for all AudioDevice3D implementations on unbuffered sound data.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.media.j3d.AudioDevice3D.STREAMING_AUDIO_DATA">Constant Field Values</A></DL></DL><HR><A NAME="BUFFERED_AUDIO_DATA"><!-- --></A><H3>BUFFERED_AUDIO_DATA</H3><PRE>public static final int <B>BUFFERED_AUDIO_DATA</B></PRE><DL><DD>Sound data specified as Buffered is copied by the AudioDevice driver implementation.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.media.j3d.AudioDevice3D.BUFFERED_AUDIO_DATA">Constant Field Values</A></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="setView(javax.media.j3d.View)"><!-- --></A><H3>setView</H3><PRE>public void <B>setView</B>(<A HREF="../../../javax/media/j3d/View.html">View</A> reference)</PRE><DL><DD>Accepts a reference to the current View. Passes reference to current View Object. The PhysicalEnvironment parameters (with playback type and speaker placement), and the PhysicalBody parameters (position/orientation of ears) can be obtained from this object, and the transformations to/from ViewPlatform coordinate (space the listener's head is in) and Virtual World coordinates (space sounds are in). <P> This method should only be called by Java3D Core and NOT by any application.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>reference</CODE> - the current View</DL></DD></DL><HR><A NAME="prepareSound(int, javax.media.j3d.MediaContainer)"><!-- --></A><H3>prepareSound</H3><PRE>public int <B>prepareSound</B>(int soundType, <A HREF="../../../javax/media/j3d/MediaContainer.html">MediaContainer</A> soundData)</PRE><DL><DD>Accepts a reference to the MediaContainer which contains a reference to sound data and information about the type of data it is. A "sound type" input parameter denotes if the Java 3D sound associated with this sample is a Background, Point, or Cone Sound node. Depending on the type of MediaContainer the sound data is and on the implementation of the AudioDevice used, sound data preparation could consist of opening, attaching, or loading sound data into the device. Unless the cached flag is true, this sound data should NOT be copied, if possible, into host or device memory.<P> Once this preparation is complete for the sound sample, an AudioDevice specific index, used to reference the sample in future method calls, is returned. All the rest of the methods described below require this index as a parameter. <P> This method should only be called by Java3D Core and NOT by any application.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>soundType</CODE> - defines the type of Sound Node: Background, Point, and Cone<DD><CODE>soundData</CODE> - reference to MediaContainer sound data and cached flag<DT><B>Returns:</B><DD>device specific sample index used for referencing this sound</DL></DD></DL><HR><A NAME="clearSound(int)"><!-- --></A><H3>clearSound</H3><PRE>public void <B>clearSound</B>(int index)</PRE><DL><DD>Requests that the AudioDevice free all resources associated with sample with index id. <P> This method should only be called by Java3D Core and NOT by any application.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - device specific reference number to device driver sample</DL></DD></DL><HR><A NAME="getSampleDuration(int)"><!-- --></A><H3>getSampleDuration</H3><PRE>public long <B>getSampleDuration</B>(int index)</PRE><DL><DD>Returns the duration in milliseconds of the sound sample, if this information can be determined. For non-cached streams, this method returns Sound.DURATION_UNKNOWN.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -