Răsfoiți Sursa

translate audio api page.

ZhangPeng 7 ani în urmă
părinte
comite
7b0c2f2f54
1 a modificat fișierele cu 48 adăugiri și 52 ștergeri
  1. 48 52
      docs/api/zh/audio/Audio.html

+ 48 - 52
docs/api/zh/audio/Audio.html

@@ -13,13 +13,13 @@
 		<h1>[name]</h1>
 
 		<p class="desc">
-			Create a non-positional ( global ) audio object.<br /><br />
+			创建一个( 全局 ) audio对象.<br /><br />
 
-			This uses the [link:https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API Web Audio API].
+			使用 [link:https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API Web Audio API].
 		</p>
 
 
-		<h2>Example</h2>
+		<h2>例子</h2>
 
 		<p>
 			[example:webaudio_sandbox webaudio / sandbox ]</br>
@@ -45,171 +45,167 @@
 		</code>
 
 
-		<h2>Constructor</h2>
+		<h2>构造函数</h2>
 
 
 		<h3>[name]( [param:AudioListener listener] )</h3>
 		<p>
-		listener — (required) [page:AudioListener AudioListener] instance.
+		listener — (必须) [page:AudioListener AudioListener] 的实例.
 		</p>
 
 
-		<h2>Properties</h2>
+		<h2>属性</h2>
 
 		<h3>[property:Boolean autoplay]</h3>
-		<p>Whether to start playback automatically. Default is *false*.</p>
+		<p>是否自动开始播放. 默认为 *false*.</p>
 
 		<h3>[property:AudioContext context]</h3>
-		<p>The [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext AudioContext] of the [page:AudioListener listener] given in the constructor.</p>
+		<p>构造函数中传入[page:AudioListener listener]的[link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext AudioContext].</p>
 
 		<h3>[property:Array filters]</h3>
-		<p>Represents an array of [link:https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode BiquadFilterNodes]. Can be used to apply a variety of low-order filters to create more complex sound effects. Filters are set via [page:Audio.setFilter] or [page:Audio.setFilters].</p>
+		<p>表示[link:https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode BiquadFilterNodes]的数组. 可以使用多种不同的低阶filters去创建复杂的音效. filters可以通过 [page:Audio.setFilter] 或者 [page:Audio.setFilters]设置.</p>
 
 		<h3>[property:GainNode gain]</h3>
-		<p>A [link:https://developer.mozilla.org/en-US/docs/Web/API/GainNode GainNode] created
-		using [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createGain AudioContext.createGain]().</p>
+		<p>使用[link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createGain AudioContext.createGain]()创建的[link:https://developer.mozilla.org/en-US/docs/Web/API/GainNode GainNode].</p>
 
 		<h3>[property:Boolean hasPlaybackControl]</h3>
-		<p>Whether playback can be controlled using the [page:Audio.play play](),
-			[page:Audio.pause pause]() etc. methods. Default is *true*.</p>
+		<p>是否可以使用 [page:Audio.play play](),
+			[page:Audio.pause pause]()等方法控制播放. 默认为 *true*.</p>
 
 		<h3>[property:Number playbackRate]</h3>
-		<p>Speed of playback. Default is *1*.</p>
+		<p>播放速率. 默认为 *1*.</p>
 
 		<h3>[property:Boolean isPlaying]</h3>
-		<p>Whether the audio is currently playing.</p>
+		<p>是否正在播放</p>
 
 		<h3>[property:Number startTime]</h3>
-		<p>The time at which the sound should begin to play. Same as the *when* paramter of [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/start AudioBufferSourceNode.start](). Default is *0*.</p>
+		<p>开始播放的时间. 和[link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/start AudioBufferSourceNode.start]()的*when*参数一样. 默认为 *0*.</p>
 
 		<h3>[property:Number offset]</h3>
-		<p>An offset to the time within the audio buffer that playback should begin. Same as the *offset* paramter of [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/start AudioBufferSourceNode.start](). Default is *0*.</p>
+		<p>音频开始播放的偏移时间. 和[link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/start AudioBufferSourceNode.start]()的*offset*参数一样. 默认为 *0*.</p>
 
 		<h3>[property:String source]</h3>
-		<p>An [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode AudioBufferSourceNode] created
-		using [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createBufferSource AudioContext.createBufferSource]().</p>
+		<p>使用 [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createBufferSource AudioContext.createBufferSource]()创建的[link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode AudioBufferSourceNode].</p>
 
 		<h3>[property:String sourceType]</h3>
-		<p>Type of the audio source. Default is string 'empty'.</p>
+		<p>音源的类型. 默认为 'empty'.</p>
 
 		<h3>[property:String type]</h3>
-		<p>String denoting the type, set to 'Audio'.</p>
+		<p>表示类型的字符串, 设置为'Audio'.</p>
 
 
-		<h2>Methods</h2>
+		<h2>方法</h2>
 
 		<h3>[method:Audio connect]()</h3>
 		<p>
-		Connect to the [page:Audio.source]. This is used internally on initialisation and when
-		setting / removing filters.
+		连接[page:Audio.source]. 在初始化和设置/删除filters时使用.
 		</p>
 
 		<h3>[method:Audio disconnect]()</h3>
 		<p>
-		Disconnect from the [page:Audio.source]. This is used internally when
-		setting / removing filters.
+		断开连接[page:Audio.source]. 在设置/删除filters时使用.
 		</p>
 
 		<h3>[method:BiquadFilterNode getFilter]()</h3>
 		<p>
-		Returns the first element of the [page:Audio.filters filters] array.
+		返回 [page:Audio.filters filters] 数组的第一个元素.
 		</p>
 
 		<h3>[method:Array getFilters]()</h3>
 		<p>
-		Returns the [page:Audio.filters filters] array.
+		返回[page:Audio.filters filters] 数组.
 		</p>
 
 		<h3>[method:Boolean getLoop]()</h3>
 		<p>
-		Return the value of [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loop source.loop]
-		 (whether playback should loop).
+		返回[link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loop source.loop]
+		 (是否循环播放)的值.
 		</p>
 
 		<h3>[method:GainNode getOutput]()</h3>
 		<p>
-		Return the [page:Audio.gain gainNode].
+		返回[page:Audio.gain gainNode].
 		</p>
 
 		<h3>[method:Float getPlaybackRate]()</h3>
 		<p>
-		Return the value of [page:Audio.playbackRate playbackRate].
+		返回[page:Audio.playbackRate playbackRate]的值.
 		</p>
 
 		<h3>[method:Float getVolume]( value )</h3>
 		<p>
-		Return the current volume.
+		返回音量.
 		</p>
 
 		<h3>[method:Audio play]()</h3>
 		<p>
-		If [page:Audio.hasPlaybackControl hasPlaybackControl] is true, starts playback.
+		如果[page:Audio.hasPlaybackControl hasPlaybackControl]是true, 开始播放.
 		</p>
 
 		<h3>[method:Audio pause]()</h3>
 		<p>
-		If [page:Audio.hasPlaybackControl hasPlaybackControl] is true, pauses playback.
+		如果[page:Audio.hasPlaybackControl hasPlaybackControl]是true, 暂停播放.
 		</p>
 
 		<h3>[method:null onEnded]()</h3>
 		<p>
-		Called automatically when playback finished. Sets If [page:Audio.isPlaying isPlaying] to false.
+		播放完成后自动调用. 如果[page:Audio.isPlaying isPlaying]设置为false.
 		</p>
 
 		<h3>[method:Audio setBuffer]( audioBuffer )</h3>
 		<p>
-		Setup the [page:Audio.source source] to the audioBuffer, and sets [page:Audio.sourceType sourceType] to 'buffer'.<br />
-		If [page:Audio.autoplay autoplay], also starts playback.
+		设置[page:Audio.source source]给audioBuffer, 和设置[page:Audio.sourceType sourceType]给'buffer'.<br />
+		如果[page:Audio.autoplay autoplay]为true, 也开始播放.
 		</p>
 
 		<h3>[method:Audio setFilter]( filter )</h3>
 		<p>
-		Applies a single [link:https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode BiquadFilterNode] to the audio.
+		设置一个[link:https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode BiquadFilterNode]给Audio.
 		</p>
 
 		<h3>[method:Audio setFilters]( [param:Array value] )</h3>
 		<p>
-		value - arrays of filters.<br />
-		Applies an array of [link:https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode BiquadFilterNodes] to the audio.
+		value--filters数组.<br />
+		应用[link:https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode BiquadFilterNodes]数组给Audio.
 		</p>
 
 		<h3>[method:Audio setLoop]( [param:Boolean value] )</h3>
 		<p>
-		Set [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loop source.loop] to *value*
-		(whether playback should loop).
+		设置[link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loop source.loop] 的值
+		(是否循环播放).
 		</p>
 
 		<h3>[method:Audio setMediaElementSource]( mediaElement )</h3>
 		<p>
-		Applies the given object of type [link:https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement HTMLMediaElement] as the source of this audio.<br />
-		Also sets [page:Audio.hasPlaybackControl hasPlaybackControl] to false.
+		应用[link:https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement HTMLMediaElement]类型对象作为音源.<br />
+		并且设置[page:Audio.hasPlaybackControl hasPlaybackControl]为false.
 
 		</p>
 
 		<h3>[method:Audio setNodeSource]( audioNode )</h3>
 		<p>
-		Setup the [page:Audio.source source] to the audioBuffer, and sets [page:Audio.sourceType sourceType] to 'audioNode'.<br />
-		Also sets [page:Audio.hasPlaybackControl hasPlaybackControl] to false.
+		设置[page:Audio.source source]给audioBuffer, 和设置[page:Audio.sourceType sourceType]给 'audioNode'.<br />
+		并且设置[page:Audio.hasPlaybackControl hasPlaybackControl]为false.
 
 		</p>
 
 		<h3>[method:Audio setPlaybackRate]( [param:Float value] )</h3>
 		<p>
-		If [page:Audio.hasPlaybackControl hasPlaybackControl] is enabled, set the [page:Audio.playbackRate playbackRate] to *value*.
+		如果[page:Audio.hasPlaybackControl hasPlaybackControl]是true, 设置[page:Audio.playbackRate playbackRate](播放速率) 的值.
 		</p>
 
 		<h3>[method:Audio setVolume]( [param:Float value] )</h3>
 		<p>
-		Set the volume.
+		设置音量.
 		</p>
 
 		<h3>[method:Audio stop]()</h3>
 		<p>
-		If [page:Audio.hasPlaybackControl hasPlaybackControl] is enabled, stops playback,
-		resets [page:Audio.startTime startTime] to *0* and sets [page:Audio.isPlaying isPlaying] to false.
+		如果[page:Audio.hasPlaybackControl hasPlaybackControl]是true, 停止播放,
+		重新设置[page:Audio.startTime startTime]为 *0* 和 设置 [page:Audio.isPlaying isPlaying]为false.
 		</p>
 
-		<h2>Source</h2>
+		<h2>源码</h2>
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
 	</body>