📄 audiodevice3d.html
字号:
<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<DT><B>Returns:</B><DD>sound duration in milliseconds if this can be determined, otherwise (for non-cached streams) Sound.DURATION_UNKNOWN is returned</DL></DD></DL><HR><A NAME="getNumberOfChannelsUsed(int)"><!-- --></A><H3>getNumberOfChannelsUsed</H3><PRE>public int <B>getNumberOfChannelsUsed</B>(int index)</PRE><DL><DD>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. This form of this method takes the sound's current state (including whether it is muted or unmuted) into account.<P> For some AudioDevice3D implementations: <UL> Muted sound take channels up on the systems mixer (because they're rendered as samples playing with gain zero.<P> A single sound could be rendered using multiple samples, each taking up mixer channels.</UL> <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<DT><B>Returns:</B><DD>number of channels used by sound if it were playing</DL></DD></DL><HR><A NAME="getNumberOfChannelsUsed(int, boolean)"><!-- --></A><H3>getNumberOfChannelsUsed</H3><PRE>public int <B>getNumberOfChannelsUsed</B>(int index, boolean muted)</PRE><DL><DD>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. Rather than using the actual current muted/unmuted state of the sound, the muted parameter is used in making the determination. <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<DD><CODE>muted</CODE> - flag to use as the current muted state ignoring current mute state<DT><B>Returns:</B><DD>number of channels used by sound if it were playing</DL></DD></DL><HR><A NAME="startSample(int)"><!-- --></A><H3>startSample</H3><PRE>public int <B>startSample</B>(int index)</PRE><DL><DD>Begins a sound playing on the AudioDevice. <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<DT><B>Returns:</B><DD>flag denoting if sample was started; 1 if true, 0 if false</DL></DD></DL><HR><A NAME="getStartTime(int)"><!-- --></A><H3>getStartTime</H3><PRE>public long <B>getStartTime</B>(int index)</PRE><DL><DD>Returns the system time of when the sound was last "started". Note that this start time will be as accurate as the AudioDevice implementation can make it - but that it is not guaranteed to be exact. <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<DT><B>Returns:</B><DD>system time in milliseconds of the last time sound was started</DL></DD></DL><HR><A NAME="stopSample(int)"><!-- --></A><H3>stopSample</H3><PRE>public int <B>stopSample</B>(int index)</PRE><DL><DD>Stops the sound on the AudioDevice. <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 associated with sound data to be played<DT><B>Returns:</B><DD>flag denoting if sample was stopped; 1 if true, 0 if false</DL></DD></DL><HR><A NAME="setSampleGain(int, float)"><!-- --></A><H3>setSampleGain</H3><PRE>public void <B>setSampleGain</B>(int index, float scaleFactor)</PRE><DL><DD>Sets the overall gain scale factor applied to data associated with this source to increase or decrease its overall amplitude. The gain scale factor value passed into this method is the combined value of the Sound node's Initial Gain and the current AuralAttribute Gain scale factors. <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="setLoop(int, int)"><!-- --></A><H3>setLoop</H3><PRE>public void <B>setLoop</B>(int index, int count)</PRE><DL><DD>Sets a sound's loop count. A full description of this parameter and how it is used is in the documentation for Sound.setLoop. <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<DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/Sound.html#setLoop(int)"><CODE>Sound.setLoop(int)</CODE></A></DL></DD></DL><HR><A NAME="setVworldXfrm(int, javax.media.j3d.Transform3D)"><!-- --></A><H3>setVworldXfrm</H3><PRE>public void <B>setVworldXfrm</B>(int index, <A HREF="../../../javax/media/j3d/Transform3D.html">Transform3D</A> trans)</PRE><DL><DD>Passes a reference to the concatenated transformation to be applied to local sound position and direction parameters. <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<DD><CODE>trans</CODE> - transformation matrix applied to local coordinate parameters</DL></DD></DL><HR><A NAME="setPosition(int, javax.vecmath.Point3d)"><!-- --></A><H3>setPosition</H3><PRE>public void <B>setPosition</B>(int index, <A HREF="../../../javax/vecmath/Point3d.html">Point3d</A> position)</PRE><DL><DD>Sets this sound's location (in Local coordinates) from specified Point. The form of the position parameter matches those of the PointSound method of the same name. A full description of this parameter and how it is used is in the documentation for PointSound class. <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<DD><CODE>position</CODE> - location of Point or Cone Sound in Virtual World coordinates<DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/PointSound.html#setPosition(float, float, float)"><CODE>PointSound.setPosition(float x, float y, float z)</CODE></A>, <A HREF="../../../javax/media/j3d/PointSound.html#setPosition(javax.vecmath.Point3f)"><CODE>PointSound.setPosition(Point3f position)</CODE></A></DL></DD></DL><HR><A NAME="setDistanceGain(int, double[], float[], double[], float[])"><!-- --></A><H3>setDistanceGain</H3><PRE>public void <B>setDistanceGain</B>(int index, double[] frontDistance, float[] frontAttenuationScaleFactor, double[] backDistance, float[] backAttenuationScaleFactor)</PRE><DL><DD>Sets this sound's distance gain elliptical attenuation (not including filter cutoff frequency) by defining corresponding arrays containing distances from the sound's origin and gain scale factors applied to all active positional sounds. Gain scale factor is applied to sound based on the distance the listener is from sound source. These attenuation parameters are ignored for BackgroundSound nodes. The back attenuation parameter is ignored for PointSound nodes. <P> The form of the attenuation parameters match that of the ConeSound method of the same name. A full description of this parameter and how it is used is in the documentation for ConeSound class. <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<DD><CODE>frontDistance</CODE> - defines an array of distance along positive axis through which ellipses pass<DD><CODE>frontAttenuationScaleFactor</CODE> - gain scale factors<DD><CODE>backDistance</CODE> - defines an array of distance along the negative axis through which ellipses pass<DD><CODE>backAttenuationScaleFactor</CODE> - gain scale factors<DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/ConeSound.html#setDistanceGain(float[], float[], float[], float[])"><CODE>ConeSound.setDistanceGain(float[] frontDistance, float[] frontGain, float[] backDistance, float[] backGain)</CODE></A>, <A HREF="../../../javax/media/j3d/ConeSound.html#setDistanceGain(javax.vecmath.Point2f[], javax.vecmath.Point2f[])"><CODE>ConeSound.setDistanceGain(Point2f[] frontAttenuation, Point2f[] backAttenuation)</CODE></A></DL></DD></DL><HR><A NAME="setDirection(int, javax.vecmath.Vector3d)"><!-- --></A><H3>setDirection</H3><PRE>public void <B>setDirection</B>(int index, <A HREF="../../../javax/vecmath/Vector3d.html">Vector3d</A> direction)</PRE><DL><DD>Sets this sound's direction from the local coordinate vector provided. The form of the direction parameter matches that of the ConeSound method of the same name. A full description of this parameter and how it is used is in the documentation for the ConeSound class. <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<DD><CODE>direction</CODE> - the new direction vector in local coordinates<DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/ConeSound.html#setDirection(float, float, float)"><CODE>ConeSound.setDirection(float x, float y, float z)</CODE></A>, <A HREF="../../../javax/media/j3d/ConeSound.html#setDirection(javax.vecmath.Vector3f)"><CODE>ConeSound.setDirection(Vector3f direction)</CODE></A></DL></DD></DL><HR><A NAME="setAngularAttenuation(int, int, double[], float[], float[])"><!-- --></A><H3>setAngularAttenuation</H3><PRE>public void <B>setAngularAttenuation</B>(int index, int filterType, double[] angle, float[] attenuationScaleFactor, float[] filterCutoff)</PRE><DL><DD>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. Gain scale factor is applied to sound based on the angle between the sound's axis and the ray from the sound source origin to the listener. The form of the attenuation parameter matches that of the ConeSound method of the same name. A full description of this parameter and how it is used is in the documentation for the ConeSound class. <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<DD><CODE>filterType</CODE> - describes type (if any) of filtering defined by attenuation<DD><CODE>angle</CODE> - array containing angular distances from sound axis<DD><CODE>attenuationScaleFactor</CODE> - array containing gain scale factor<DD><CODE>filterCutoff</CODE> - array containing filter cutoff frequencies. The filter values for each tuples can be set to Sound.NO_FILTER.<DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/ConeSound.html#setAngularAttenuation(float[], float[], float[])"><CODE>ConeSound.setAngularAttenuation(float[] distance, float[] gain, float[] filter)</CODE></A>, <A HREF="../../../javax/media/j3d/ConeSound.html#setAngularAttenuation(javax.vecmath.Point3f[])"><CODE>ConeSound.setAngularAttenuation(Point3f[] attenuation)</CODE></A>, <A HREF="../../../javax/media/j3d/ConeSound.html#setAngularAttenuation(javax.vecmath.Point2f[])"><CODE>ConeSound.setAngularAttenuation(Point2f[] attenuation)</CODE></A></DL></DD></DL><HR><A NAME="setRolloff(float)"><!-- --></A><H3>setRolloff</H3><PRE>public void <B>setRolloff</B>(float rolloff)</PRE><DL><DD>Changes the speed of sound factor. A full description of this parameter and how it is used is in the documentation for the AuralAttributes class. <P>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -