⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 audiodevice.html

📁 JAVA多媒体开发类库说明
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_06) on Wed Dec 13 16:19:59 PST 2006 --><TITLE>AudioDevice (Java 3D 1.5.0)</TITLE><META NAME="keywords" CONTENT="javax.media.j3d.AudioDevice interface"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="AudioDevice (Java 3D 1.5.0)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../javax/media/j3d/Appearance.html" title="class in javax.media.j3d"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/media/j3d/AudioDevice3D.html" title="interface in javax.media.j3d"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html?javax/media/j3d/AudioDevice.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="AudioDevice.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.media.j3d</FONT><BR>Interface AudioDevice</H2><DL><DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../javax/media/j3d/AudioDevice3D.html" title="interface in javax.media.j3d">AudioDevice3D</A>, <A HREF="../../../javax/media/j3d/AudioDevice3DL2.html" title="interface in javax.media.j3d">AudioDevice3DL2</A></DD></DL><DL><DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../com/sun/j3d/audioengines/AudioEngine.html" title="class in com.sun.j3d.audioengines">AudioEngine</A>, <A HREF="../../../com/sun/j3d/audioengines/AudioEngine3D.html" title="class in com.sun.j3d.audioengines">AudioEngine3D</A>, <A HREF="../../../com/sun/j3d/audioengines/AudioEngine3DL2.html" title="class in com.sun.j3d.audioengines">AudioEngine3DL2</A>, <A HREF="../../../com/sun/j3d/audioengines/javasound/JavaSoundMixer.html" title="class in com.sun.j3d.audioengines.javasound">JavaSoundMixer</A></DD></DL><HR><DL><DT><PRE>public interface <B>AudioDevice</B></DL></PRE><P>The AudioDevice Class defines and encapsulates the  audio device's basic information and characteristics. <P> A Java3D application running on a particular machine could have one of several options available to it for playing the audio image created by the sound renderer. Perhaps the machine Java3D is executing on has more than one sound card (e.g., one that is a Wave Table Synthesis card and the other with accelerated sound spatialization hardware). Furthermore, suppose there are Java3D audio device drivers that execute Java3D audio methods on each of these specific cards. In such a case the application would have at least two audio device drivers through which the audio could be produced. For such a case the Java3D application must choose the audio device driver with which sound rendering is to be performed. Once this audio device is chosen, the application can additionally select the type of audio playback type the rendered sound image is to be output on. The playback device (headphones or speaker(s)) is physically connected to the port the selected device driver outputs to.<P> AudioDevice Interface<P> <UL> The selection of this device driver is done through methods in the     PhysicalEnvironment object - see PhysicalEnvironment class.     The application would query how many audio devices are available. For     each device, the user can get the AudioDevice object that describes it     and query its characteristics. Once a decision is made about which of     the available audio devices to use for a PhysicalEnvironment, the      particular device is set into this PhysicalEnvironment's fields. Each     PhysicalEnvironment object may use only a single audio device.<P>     The AudioDevice object interface specifies an abstract input device     that creators of Java3D class libraries would implement for a particular     device. Java3D's uses several methods to interact with specific devices.     Since all audio devices implement this consistent interface, the user     could have a portable means of initialize, set particular audio device     elements and query generic characteristics for any audio device.<P>Initialization<P><UL>  Each audio device driver must be initialized.   The chosen device driver should be initialized before any Java3D   Sound methods are executed because the implementation of the Sound   methods, in general, are potentially device driver dependent.</UL><P> Audio Playback Type<P><UL>  These methods set and retrieve the audio playback type used to output  the analog audio from rendering Java3D Sound nodes.  The audio playback type specifies that playback will be through:  stereo headphones, a monaural speaker,  or a pair of speakers.  For the stereo speakers, it is assumed that the two output speakers are  equally distant from the listener, both at same angle from the head  axis (thus oriented symmetrically about the listener), and at the same  elevation.  The type of playback chosen affects the sound image generated.  Cross-talk cancellation is applied to the audio image if playback over  stereo speakers is selected.</UL><P> Distance to Speaker<P><UL> These methods set and retrieve the distance in meters from the center  ear (the midpoint between the left and right ears) and one of the  speakers in the listener's environment. For monaural speaker playback, a typical distance from the listener to the speaker in a workstation cabinet is 0.76 meters. For stereo speakers placed at the sides of the display, this might be 0.82 meters.</UL><P>  Angular Offset of Speakers<P><UL>  These methods set and retrieve the angle in radians between the vectors  from the center ear to each of the speaker transducers and the vectors  from the center ear parallel to the head coordinate's Z axis. Speakers  placed at the sides of the computer display typically range between  0.28 to 0.35 radians (between 10 and 20 degrees).</UL><P>  Device Driver Specific Data<P><UL>  While the sound image created for final output to the playback system  is either only mono or stereo (for this version of Java3D) most device  driver implementations will mix the left and right image signals   generated for each rendered sound source before outputting the final  playback image. Each sound source will use N input channels of this  internal mixer. Each implemented Java3D audio device driver will have  its own limitations and driver-specific characteristics. These include  channel availability and usage (during rendering).  Methods for   querying these device-driver specific characteristics are provided.</UL></UL><P> Instantiating and Registering a New Device<P><UL> A browser or applications developer must instantiate whatever system-     specific audio devices that he or she needs and that exist on the system.     This device information typically exists in a site configuration file.     The browser or application will instantiate the physical environment as     requested by the end-user.<P>     The API for instantiating devices is site-specific, but it consists of     a device object with a constructor and at least all of the methods     specified in the AudioDevice interface.<P>     Once instantiated, the browser or application must register the device     with the Java3D sound scheduler by associating this device with a     PhysicalEnvironment.  The setAudioDevice method introduces new devices     to the Java3D environment and the allAudioDevices method produces an     enumeration that allows examining all available devices within a Java3D     environment. See PhysicalEnvironment class for more details.</UL> <P> General Rules for calling AudioDevice methods: It is illegal for an application to call any non-query AudioDevice method  if the AudioDevice is created then explicitly assigned to a PhysicalEnvironment using PhysicalEnvironment.setAudioDevice(); When either PhysicalEnvironment.setAudioDevice() is called - including when implicitly called by SimpleUniverse.getViewer().createAudioDevice() - the Core creates a SoundScheduler thread which makes calls to the AudioDevice. <P> If an application creates it's own instance of an AudioDevice and initializes it directly, rather than using PhysicalEnvironment. setAudioDevice(), that application may make <i>any</i> AudioDevice3D methods calls without fear of the Java 3D Core also trying to control the AudioDevice. Under this condition it is safe to call AudioDevice non-query methods.<P><P><HR><P><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Field Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice.html#HEADPHONES">HEADPHONES</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Choosing Headphones as the audio playback type     specifies that the audio playback will be through stereo headphones.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice.html#MONO_SPEAKER">MONO_SPEAKER</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Choosing a      single near-field monoaural speaker     as the audio playback type     specifies that the audio playback will be through a single speaker     some supplied distance away from the listener.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice.html#STEREO_SPEAKERS">STEREO_SPEAKERS</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Choosing a      two near-field stereo speakers     as the audio playback type     specifies that the audio playback will be through stereo speakers     some supplied distance away from, and at some given angle to      the listener.</TD></TR></TABLE>&nbsp;<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice.html#close()">close</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Code to close the device and release resources.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice.html#getAngleOffsetToSpeaker()">getAngleOffsetToSpeaker</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get Angle Offset (in radians) To Speaker.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice.html#getAudioPlaybackType()">getAudioPlaybackType</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get Type of Audio Playback Output Device.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice.html#getCenterEarToSpeaker()">getCenterEarToSpeaker</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get Distance from interaural mid-point between Ears to a Speaker.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice.html#getChannelsAvailable()">getChannelsAvailable</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Query number of channels currently available for use.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice.html#getChannelsUsedForSound(javax.media.j3d.Sound)">getChannelsUsedForSound</A></B>(<A HREF="../../../javax/media/j3d/Sound.html" title="class in javax.media.j3d">Sound</A>&nbsp;node)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Query number of channels that are used, or would be used to render  a particular sound node.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/AudioDevice.html#getTotalChannels()">getTotalChannels</A></B>()</CODE><BR>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -