onejs-core 3.0.3 → 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitattributes +2 -2
- package/.prettierrc +5 -5
- package/.vscode/settings.json +5 -5
- package/LICENSE +20 -20
- package/README.md +102 -102
- package/bin/oj.js +252 -252
- package/definitions/Assemblies/OneJS.Runtime.Ext.d.ts +6 -6
- package/definitions/Assemblies/OneJS.Runtime.d.ts +826 -826
- package/definitions/Assemblies/OneJS.Samples.d.ts +20 -20
- package/definitions/Assemblies/Unity.Mathematics.d.ts +9221 -9221
- package/definitions/Assemblies/UnityEditor.CoreModule.d.ts +32614 -32614
- package/definitions/Assemblies/UnityEngine.AIModule.d.ts +998 -998
- package/definitions/Assemblies/UnityEngine.AnimationModule.d.ts +3308 -3308
- package/definitions/Assemblies/UnityEngine.AssetBundleModule.d.ts +337 -337
- package/definitions/Assemblies/UnityEngine.AudioModule.d.ts +1154 -1154
- package/definitions/Assemblies/UnityEngine.CoreModule.d.ts +29587 -29587
- package/definitions/Assemblies/UnityEngine.PhysicsModule.d.ts +3137 -3137
- package/definitions/Assemblies/UnityEngine.TerrainModule.d.ts +1270 -1270
- package/definitions/Assemblies/UnityEngine.UIElementsModule.d.ts +32718 -32718
- package/definitions/Assemblies/UnityEngine.UnityAnalyticsCommonModule.d.ts +274 -274
- package/definitions/Assemblies/index.d.ts +16 -16
- package/definitions/Assemblies/mscorlib.d.ts +19416 -19416
- package/definitions/augments.d.ts +66 -66
- package/definitions/globals.d.ts +53 -53
- package/definitions/index.d.ts +11 -11
- package/definitions/jsx.d.ts +570 -570
- package/definitions/modules.d.ts +32 -32
- package/definitions/onejs.d.ts +171 -171
- package/definitions/preact.jsx.d.ts +6 -6
- package/definitions/proto-overrides.d.ts +41 -41
- package/definitions/puerts.d.ts +30 -30
- package/definitions/unity-engine.d.ts +22 -22
- package/dist/dom/document.d.ts +30 -0
- package/dist/dom/document.js +89 -0
- package/dist/dom/dom-style.d.ts +9 -0
- package/dist/dom/dom-style.js +27 -0
- package/dist/dom/dom.d.ts +83 -0
- package/dist/dom/dom.js +313 -0
- package/dist/dom/index.d.ts +4 -0
- package/dist/dom/index.js +4 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +45 -0
- package/dist/math/index.d.ts +86 -0
- package/dist/math/index.js +361 -0
- package/dist/preloads/inject.d.ts +3 -0
- package/dist/preloads/inject.js +36 -0
- package/dist/styling/index.d.ts +10 -0
- package/dist/styling/index.js +28 -0
- package/dist/styling/utils/generateAlphabeticName.d.ts +1 -0
- package/dist/styling/utils/generateAlphabeticName.js +16 -0
- package/dist/styling/utils/generateComponentId.d.ts +1 -0
- package/dist/styling/utils/generateComponentId.js +5 -0
- package/dist/styling/utils/hash.d.ts +5 -0
- package/dist/styling/utils/hash.js +34 -0
- package/dist/utils/arrays.d.ts +1 -0
- package/dist/utils/arrays.js +10 -0
- package/dist/utils/color-palettes.d.ts +2 -0
- package/dist/utils/color-palettes.js +2 -0
- package/dist/utils/color-parser.d.ts +161 -0
- package/dist/utils/color-parser.js +241 -0
- package/dist/utils/float-parser.d.ts +7 -0
- package/dist/utils/float-parser.js +23 -0
- package/dist/utils/index.d.ts +12 -0
- package/dist/utils/index.js +15 -0
- package/dist/utils/subscribe.d.ts +4 -0
- package/dist/utils/subscribe.js +10 -0
- package/dist/utils/system.d.ts +1 -0
- package/dist/utils/system.js +16 -0
- package/dom/document.ts +115 -115
- package/dom/dom-style.ts +36 -36
- package/dom/dom.ts +376 -376
- package/dom/index.ts +3 -3
- package/index.ts +59 -59
- package/jsr.json +9 -9
- package/math/README.md +212 -212
- package/math/index.ts +487 -487
- package/package.json +34 -33
- package/preloads/inject.ts +43 -43
- package/scripts/esbuild/copy-assets.mjs +94 -94
- package/scripts/esbuild/decorator-fix.mjs +17 -17
- package/scripts/esbuild/import-transform.mjs +100 -100
- package/scripts/esbuild/index.mjs +3 -3
- package/scripts/esbuild/watch-output.mjs +38 -38
- package/scripts/postcss/cleanup-plugin.cjs +89 -89
- package/scripts/postcss/onejs-tw-config.cjs +252 -252
- package/scripts/postcss/optional-import-plugin.cjs +26 -26
- package/scripts/postcss/tailwind-logging-plugin.cjs +11 -11
- package/scripts/postcss/unwrap-is-plugin.cjs +16 -16
- package/scripts/postcss/uss-transform-plugin.cjs +92 -92
- package/scripts/switch.cjs +321 -290
- package/styling/index.tsx +32 -32
- package/styling/utils/generateAlphabeticName.ts +20 -20
- package/styling/utils/generateComponentId.ts +5 -5
- package/styling/utils/hash.ts +46 -46
- package/tsconfig.json +24 -24
- package/typings.d.ts +5 -5
- package/utils/arrays.ts +10 -10
- package/utils/color-palettes.ts +2 -2
- package/utils/color-parser.ts +248 -248
- package/utils/float-parser.ts +30 -30
- package/utils/index.ts +15 -15
- package/utils/subscribe.ts +16 -16
- package/utils/system.ts +16 -16
|
@@ -1,1154 +1,1154 @@
|
|
|
1
|
-
|
|
2
|
-
declare namespace CS {
|
|
3
|
-
// const __keep_incompatibility: unique symbol;
|
|
4
|
-
//
|
|
5
|
-
// interface $Ref<T> {
|
|
6
|
-
// value: T
|
|
7
|
-
// }
|
|
8
|
-
// namespace System {
|
|
9
|
-
// interface Array$1<T> extends System.Array {
|
|
10
|
-
// get_Item(index: number):T;
|
|
11
|
-
//
|
|
12
|
-
// set_Item(index: number, value: T):void;
|
|
13
|
-
// }
|
|
14
|
-
// }
|
|
15
|
-
// interface $Task<T> {}
|
|
16
|
-
namespace UnityEngine {
|
|
17
|
-
/** Controls the global audio settings from script.
|
|
18
|
-
*/
|
|
19
|
-
class AudioSettings extends System.Object
|
|
20
|
-
{
|
|
21
|
-
protected [__keep_incompatibility]: never;
|
|
22
|
-
/** Returns the speaker mode capability of the current audio driver. (Read Only)
|
|
23
|
-
*/
|
|
24
|
-
public static get driverCapabilities(): UnityEngine.AudioSpeakerMode;
|
|
25
|
-
/** AudioSettings.speakerMode is deprecated. Use AudioSettings.GetConfiguration and AudioSettings.Reset to adjust audio settings instead.
|
|
26
|
-
*/
|
|
27
|
-
public static get speakerMode(): UnityEngine.AudioSpeakerMode;
|
|
28
|
-
public static set speakerMode(value: UnityEngine.AudioSpeakerMode);
|
|
29
|
-
/** Returns the current time of the audio system.
|
|
30
|
-
*/
|
|
31
|
-
public static get dspTime(): number;
|
|
32
|
-
/** Get the mixer's current output rate.
|
|
33
|
-
*/
|
|
34
|
-
public static get outputSampleRate(): number;
|
|
35
|
-
public static set outputSampleRate(value: number);
|
|
36
|
-
/** Get the mixer's buffer size in samples.
|
|
37
|
-
* @param $bufferLength Is the length of each buffer in the ringbuffer.
|
|
38
|
-
* @param $numBuffers Is number of buffers.
|
|
39
|
-
*/
|
|
40
|
-
public static GetDSPBufferSize ($bufferLength: $Ref<number>, $numBuffers: $Ref<number>) : void
|
|
41
|
-
/** Returns an array with the names of all the available spatializer plugins.
|
|
42
|
-
* @returns An array of spatializer names.
|
|
43
|
-
*/
|
|
44
|
-
public static GetSpatializerPluginNames () : System.Array$1<string>
|
|
45
|
-
/** Returns the name of the spatializer selected on the currently-running platform.
|
|
46
|
-
* @returns The spatializer plugin name.
|
|
47
|
-
*/
|
|
48
|
-
public static GetSpatializerPluginName () : string
|
|
49
|
-
/** Sets the spatializer plugin for all platform groups. If a null or empty string is passed in, the existing spatializer plugin will be cleared.
|
|
50
|
-
* @param $pluginName The spatializer plugin name.
|
|
51
|
-
*/
|
|
52
|
-
public static SetSpatializerPluginName ($pluginName: string) : void
|
|
53
|
-
/** Returns the current configuration of the audio device and system. The values in the struct may then be modified and reapplied via AudioSettings.Reset.
|
|
54
|
-
* @returns The new configuration to be applied.
|
|
55
|
-
*/
|
|
56
|
-
public static GetConfiguration () : UnityEngine.AudioConfiguration
|
|
57
|
-
/** Changes the device configuration and invokes the AudioSettings.OnAudioConfigurationChanged delegate with the argument deviceWasChanged=false. There's no guarantee that the exact settings specified are used, but Unity automatically uses the closest match that it supports. Note: This can cause main thread stalls if AudioSettings.Reset is called when objects are loading asynchronously.
|
|
58
|
-
* @param $config The new configuration to be used.
|
|
59
|
-
* @returns True if all settings could be successfully applied.
|
|
60
|
-
*/
|
|
61
|
-
public static Reset ($config: UnityEngine.AudioConfiguration) : boolean
|
|
62
|
-
public static add_OnAudioConfigurationChanged ($value: UnityEngine.AudioSettings.AudioConfigurationChangeHandler) : void
|
|
63
|
-
public static remove_OnAudioConfigurationChanged ($value: UnityEngine.AudioSettings.AudioConfigurationChangeHandler) : void
|
|
64
|
-
public constructor ()
|
|
65
|
-
}
|
|
66
|
-
/** These are speaker types defined for use with AudioSettings.speakerMode.
|
|
67
|
-
*/
|
|
68
|
-
enum AudioSpeakerMode
|
|
69
|
-
{ Raw = 0, Mono = 1, Stereo = 2, Quad = 3, Surround = 4, Mode5point1 = 5, Mode7point1 = 6, Prologic = 7 }
|
|
70
|
-
/** Specifies the current properties or desired properties to be set for the audio system.
|
|
71
|
-
*/
|
|
72
|
-
class AudioConfiguration extends System.ValueType
|
|
73
|
-
{
|
|
74
|
-
protected [__keep_incompatibility]: never;
|
|
75
|
-
/** The current speaker mode used by the audio output device.
|
|
76
|
-
*/
|
|
77
|
-
public speakerMode : UnityEngine.AudioSpeakerMode
|
|
78
|
-
/** The length of the DSP buffer in samples determining the latency of sounds by the audio output device.
|
|
79
|
-
*/
|
|
80
|
-
public dspBufferSize : number
|
|
81
|
-
/** The current sample rate of the audio output device used.
|
|
82
|
-
*/
|
|
83
|
-
public sampleRate : number
|
|
84
|
-
/** The current maximum number of simultaneously audible sounds in the game.
|
|
85
|
-
*/
|
|
86
|
-
public numRealVoices : number
|
|
87
|
-
/** The maximum number of managed sounds in the game. Beyond this limit sounds will simply stop playing.
|
|
88
|
-
*/
|
|
89
|
-
public numVirtualVoices : number
|
|
90
|
-
}
|
|
91
|
-
class AudioBehaviour extends UnityEngine.Behaviour
|
|
92
|
-
{
|
|
93
|
-
protected [__keep_incompatibility]: never;
|
|
94
|
-
public constructor ()
|
|
95
|
-
}
|
|
96
|
-
/** A representation of audio sources in 3D.
|
|
97
|
-
*/
|
|
98
|
-
class AudioSource extends UnityEngine.AudioBehaviour
|
|
99
|
-
{
|
|
100
|
-
protected [__keep_incompatibility]: never;
|
|
101
|
-
/** The volume of the audio source (0.0 to 1.0).
|
|
102
|
-
*/
|
|
103
|
-
public get volume(): number;
|
|
104
|
-
public set volume(value: number);
|
|
105
|
-
/** The pitch of the audio source.
|
|
106
|
-
*/
|
|
107
|
-
public get pitch(): number;
|
|
108
|
-
public set pitch(value: number);
|
|
109
|
-
/** Playback position in seconds.
|
|
110
|
-
*/
|
|
111
|
-
public get time(): number;
|
|
112
|
-
public set time(value: number);
|
|
113
|
-
/** Playback position in PCM samples.
|
|
114
|
-
*/
|
|
115
|
-
public get timeSamples(): number;
|
|
116
|
-
public set timeSamples(value: number);
|
|
117
|
-
/** The default AudioClip to play.
|
|
118
|
-
*/
|
|
119
|
-
public get clip(): UnityEngine.AudioClip;
|
|
120
|
-
public set clip(value: UnityEngine.AudioClip);
|
|
121
|
-
/** The default AudioResource to play.
|
|
122
|
-
*/
|
|
123
|
-
public get resource(): UnityEngine.Audio.AudioResource;
|
|
124
|
-
public set resource(value: UnityEngine.Audio.AudioResource);
|
|
125
|
-
/** The target group to which the AudioSource should route its signal.
|
|
126
|
-
*/
|
|
127
|
-
public get outputAudioMixerGroup(): UnityEngine.Audio.AudioMixerGroup;
|
|
128
|
-
public set outputAudioMixerGroup(value: UnityEngine.Audio.AudioMixerGroup);
|
|
129
|
-
/** Gets or sets the gamepad audio output type for this audio source.
|
|
130
|
-
*/
|
|
131
|
-
public get gamepadSpeakerOutputType(): UnityEngine.GamepadSpeakerOutputType;
|
|
132
|
-
public set gamepadSpeakerOutputType(value: UnityEngine.GamepadSpeakerOutputType);
|
|
133
|
-
/** Is the clip playing right now (Read Only)?
|
|
134
|
-
*/
|
|
135
|
-
public get isPlaying(): boolean;
|
|
136
|
-
/** True if all sounds played by the AudioSource (main sound started by Play() or playOnAwake as well as one-shots) are culled by the audio system.
|
|
137
|
-
*/
|
|
138
|
-
public get isVirtual(): boolean;
|
|
139
|
-
/** Is the audio clip looping?
|
|
140
|
-
*/
|
|
141
|
-
public get loop(): boolean;
|
|
142
|
-
public set loop(value: boolean);
|
|
143
|
-
/** This makes the audio source not take into account the volume of the audio listener.
|
|
144
|
-
*/
|
|
145
|
-
public get ignoreListenerVolume(): boolean;
|
|
146
|
-
public set ignoreListenerVolume(value: boolean);
|
|
147
|
-
/** If set to true, the audio source will automatically start playing on awake.
|
|
148
|
-
*/
|
|
149
|
-
public get playOnAwake(): boolean;
|
|
150
|
-
public set playOnAwake(value: boolean);
|
|
151
|
-
/** Allows AudioSource to play even though AudioListener.pause is set to true. This is useful for the menu element sounds or background music in pause menus.
|
|
152
|
-
*/
|
|
153
|
-
public get ignoreListenerPause(): boolean;
|
|
154
|
-
public set ignoreListenerPause(value: boolean);
|
|
155
|
-
/** Whether the Audio Source should be updated in the fixed or dynamic update.
|
|
156
|
-
*/
|
|
157
|
-
public get velocityUpdateMode(): UnityEngine.AudioVelocityUpdateMode;
|
|
158
|
-
public set velocityUpdateMode(value: UnityEngine.AudioVelocityUpdateMode);
|
|
159
|
-
/** Pans a playing sound in a stereo way (left or right). This only applies to sounds that are Mono or Stereo.
|
|
160
|
-
*/
|
|
161
|
-
public get panStereo(): number;
|
|
162
|
-
public set panStereo(value: number);
|
|
163
|
-
/** Sets how much this AudioSource is affected by 3D spatialisation calculations (attenuation, doppler etc). 0.0 makes the sound full 2D, 1.0 makes it full 3D.
|
|
164
|
-
*/
|
|
165
|
-
public get spatialBlend(): number;
|
|
166
|
-
public set spatialBlend(value: number);
|
|
167
|
-
/** Enables or disables spatialization.
|
|
168
|
-
*/
|
|
169
|
-
public get spatialize(): boolean;
|
|
170
|
-
public set spatialize(value: boolean);
|
|
171
|
-
/** Determines if the spatializer effect is inserted before or after the effect filters.
|
|
172
|
-
*/
|
|
173
|
-
public get spatializePostEffects(): boolean;
|
|
174
|
-
public set spatializePostEffects(value: boolean);
|
|
175
|
-
/** The amount by which the signal from the AudioSource will be mixed into the global reverb associated with the Reverb Zones.
|
|
176
|
-
*/
|
|
177
|
-
public get reverbZoneMix(): number;
|
|
178
|
-
public set reverbZoneMix(value: number);
|
|
179
|
-
/** Bypass effects (Applied from filter components or global listener filters).
|
|
180
|
-
*/
|
|
181
|
-
public get bypassEffects(): boolean;
|
|
182
|
-
public set bypassEffects(value: boolean);
|
|
183
|
-
/** When set global effects on the AudioListener will not be applied to the audio signal generated by the AudioSource. Does not apply if the AudioSource is playing into a mixer group.
|
|
184
|
-
*/
|
|
185
|
-
public get bypassListenerEffects(): boolean;
|
|
186
|
-
public set bypassListenerEffects(value: boolean);
|
|
187
|
-
/** When set doesn't route the signal from an AudioSource into the global reverb associated with reverb zones.
|
|
188
|
-
*/
|
|
189
|
-
public get bypassReverbZones(): boolean;
|
|
190
|
-
public set bypassReverbZones(value: boolean);
|
|
191
|
-
/** Sets the Doppler scale for this AudioSource.
|
|
192
|
-
*/
|
|
193
|
-
public get dopplerLevel(): number;
|
|
194
|
-
public set dopplerLevel(value: number);
|
|
195
|
-
/** Sets the spread angle (in degrees) of a 3d stereo or multichannel sound in speaker space.
|
|
196
|
-
*/
|
|
197
|
-
public get spread(): number;
|
|
198
|
-
public set spread(value: number);
|
|
199
|
-
/** Sets the priority of the AudioSource.
|
|
200
|
-
*/
|
|
201
|
-
public get priority(): number;
|
|
202
|
-
public set priority(value: number);
|
|
203
|
-
/** Un- / Mutes the AudioSource. Mute sets the volume=0, Un-Mute restore the original volume.
|
|
204
|
-
*/
|
|
205
|
-
public get mute(): boolean;
|
|
206
|
-
public set mute(value: boolean);
|
|
207
|
-
/** Within the Min distance the AudioSource will cease to grow louder in volume.
|
|
208
|
-
*/
|
|
209
|
-
public get minDistance(): number;
|
|
210
|
-
public set minDistance(value: number);
|
|
211
|
-
/** (Logarithmic rolloff) MaxDistance is the distance a sound stops attenuating at.
|
|
212
|
-
*/
|
|
213
|
-
public get maxDistance(): number;
|
|
214
|
-
public set maxDistance(value: number);
|
|
215
|
-
/** Sets/Gets how the AudioSource attenuates over distance.
|
|
216
|
-
*/
|
|
217
|
-
public get rolloffMode(): UnityEngine.AudioRolloffMode;
|
|
218
|
-
public set rolloffMode(value: UnityEngine.AudioRolloffMode);
|
|
219
|
-
/** Enable playing of audio source though a specfic gamepad.
|
|
220
|
-
* @param $slot Slot number of the gamepad (0-3).
|
|
221
|
-
* @returns Returns TRUE if enabling audio output through this users controller was successful.
|
|
222
|
-
*/
|
|
223
|
-
public PlayOnGamepad ($slot: number) : boolean
|
|
224
|
-
/** Disables audio output to a gamepad for this audio source.
|
|
225
|
-
* @returns Returns true if successful.
|
|
226
|
-
*/
|
|
227
|
-
public DisableGamepadOutput () : boolean
|
|
228
|
-
public SetGamepadSpeakerMixLevel ($slot: number, $mixLevel: number) : boolean
|
|
229
|
-
public SetGamepadSpeakerMixLevelDefault ($slot: number) : boolean
|
|
230
|
-
public SetGamepadSpeakerRestrictedAudio ($slot: number, $restricted: boolean) : boolean
|
|
231
|
-
/** Check if the platform supports an audio output type on gamepads.
|
|
232
|
-
* @param $outputType The desired output type.
|
|
233
|
-
* @returns Returns true if the gamepad supports the specified audio output type.
|
|
234
|
-
*/
|
|
235
|
-
public static GamepadSpeakerSupportsOutputType ($outputType: UnityEngine.GamepadSpeakerOutputType) : boolean
|
|
236
|
-
public Play () : void
|
|
237
|
-
/** Plays the clip.
|
|
238
|
-
* @param $delay Deprecated. Delay in number of samples, assuming a 44100Hz sample rate (meaning that Play(44100) will delay the playing by exactly 1 sec).
|
|
239
|
-
*/
|
|
240
|
-
public Play ($delay: bigint) : void
|
|
241
|
-
/** Plays the clip with a delay specified in seconds. Users are advised to use this function instead of the old Play(delay) function that took a delay specified in samples relative to a reference rate of 44.1 kHz as an argument.
|
|
242
|
-
* @param $delay Delay time specified in seconds.
|
|
243
|
-
*/
|
|
244
|
-
public PlayDelayed ($delay: number) : void
|
|
245
|
-
/** Plays the clip at a specific time on the absolute time-line that AudioSettings.dspTime reads from.
|
|
246
|
-
* @param $time Time in seconds on the absolute time-line that AudioSettings.dspTime refers to for when the sound should start playing.
|
|
247
|
-
*/
|
|
248
|
-
public PlayScheduled ($time: number) : void
|
|
249
|
-
/** Plays an AudioClip, and scales the AudioSource volume by volumeScale.
|
|
250
|
-
* @param $clip The clip being played.
|
|
251
|
-
* @param $volumeScale The scale of the volume (0-1).
|
|
252
|
-
*/
|
|
253
|
-
public PlayOneShot ($clip: UnityEngine.AudioClip) : void
|
|
254
|
-
/** Plays an AudioClip, and scales the AudioSource volume by volumeScale.
|
|
255
|
-
* @param $clip The clip being played.
|
|
256
|
-
* @param $volumeScale The scale of the volume (0-1).
|
|
257
|
-
*/
|
|
258
|
-
public PlayOneShot ($clip: UnityEngine.AudioClip, $volumeScale: number) : void
|
|
259
|
-
/** Changes the time at which a sound that has already been scheduled to play will start.
|
|
260
|
-
* @param $time Time in seconds.
|
|
261
|
-
*/
|
|
262
|
-
public SetScheduledStartTime ($time: number) : void
|
|
263
|
-
/** Changes the time at which a sound that has already been scheduled to play will end. Notice that depending on the timing not all rescheduling requests can be fulfilled.
|
|
264
|
-
* @param $time Time in seconds.
|
|
265
|
-
*/
|
|
266
|
-
public SetScheduledEndTime ($time: number) : void
|
|
267
|
-
/** Stops playing the clip.
|
|
268
|
-
*/
|
|
269
|
-
public Stop () : void
|
|
270
|
-
/** Pauses playing the clip.
|
|
271
|
-
*/
|
|
272
|
-
public Pause () : void
|
|
273
|
-
/** Unpause the paused playback of this AudioSource.
|
|
274
|
-
*/
|
|
275
|
-
public UnPause () : void
|
|
276
|
-
/** Plays an AudioClip at a given position in world space.
|
|
277
|
-
* @param $clip Audio data to play.
|
|
278
|
-
* @param $position Position in world space from which sound originates.
|
|
279
|
-
* @param $volume Playback volume.
|
|
280
|
-
*/
|
|
281
|
-
public static PlayClipAtPoint ($clip: UnityEngine.AudioClip, $position: UnityEngine.Vector3) : void
|
|
282
|
-
/** Plays an AudioClip at a given position in world space.
|
|
283
|
-
* @param $clip Audio data to play.
|
|
284
|
-
* @param $position Position in world space from which sound originates.
|
|
285
|
-
* @param $volume Playback volume.
|
|
286
|
-
*/
|
|
287
|
-
public static PlayClipAtPoint ($clip: UnityEngine.AudioClip, $position: UnityEngine.Vector3, $volume: number) : void
|
|
288
|
-
/** Set the custom curve for the given AudioSourceCurveType.
|
|
289
|
-
* @param $type The curve type that should be set.
|
|
290
|
-
* @param $curve The curve that should be applied to the given curve type.
|
|
291
|
-
*/
|
|
292
|
-
public SetCustomCurve ($type: UnityEngine.AudioSourceCurveType, $curve: UnityEngine.AnimationCurve) : void
|
|
293
|
-
/** Get the current custom curve for the given AudioSourceCurveType.
|
|
294
|
-
* @param $type The curve type to get.
|
|
295
|
-
* @returns The custom AnimationCurve corresponding to the given curve type.
|
|
296
|
-
*/
|
|
297
|
-
public GetCustomCurve ($type: UnityEngine.AudioSourceCurveType) : UnityEngine.AnimationCurve
|
|
298
|
-
/** Provides a block of the currently playing source's output data.
|
|
299
|
-
* @param $samples The array to populate with audio samples. Its length must be a power of 2.
|
|
300
|
-
* @param $channel The channel to sample from.
|
|
301
|
-
*/
|
|
302
|
-
public GetOutputData ($samples: System.Array$1<number>, $channel: number) : void
|
|
303
|
-
/** Provides a block of the currently playing audio source's spectrum data.
|
|
304
|
-
* @param $samples The array to populate with audio samples. Its length must be a power of 2.
|
|
305
|
-
* @param $channel The channel to sample from.
|
|
306
|
-
* @param $window The FFTWindow type to use when sampling.
|
|
307
|
-
*/
|
|
308
|
-
public GetSpectrumData ($samples: System.Array$1<number>, $channel: number, $window: UnityEngine.FFTWindow) : void
|
|
309
|
-
/** Sets a user-defined parameter of a custom spatializer effect that is attached to an AudioSource.
|
|
310
|
-
* @param $index Zero-based index of user-defined parameter to be set.
|
|
311
|
-
* @param $value New value of the user-defined parameter.
|
|
312
|
-
* @returns True, if the parameter could be set.
|
|
313
|
-
*/
|
|
314
|
-
public SetSpatializerFloat ($index: number, $value: number) : boolean
|
|
315
|
-
/** Reads a user-defined parameter of a custom spatializer effect that is attached to an AudioSource.
|
|
316
|
-
* @param $index Zero-based index of user-defined parameter to be read.
|
|
317
|
-
* @param $value Return value of the user-defined parameter that is read.
|
|
318
|
-
* @returns True, if the parameter could be read.
|
|
319
|
-
*/
|
|
320
|
-
public GetSpatializerFloat ($index: number, $value: $Ref<number>) : boolean
|
|
321
|
-
/** Reads a user-defined parameter of a custom ambisonic decoder effect that is attached to an AudioSource.
|
|
322
|
-
* @param $index Zero-based index of user-defined parameter to be read.
|
|
323
|
-
* @param $value Return value of the user-defined parameter that is read.
|
|
324
|
-
* @returns True, if the parameter could be read.
|
|
325
|
-
*/
|
|
326
|
-
public GetAmbisonicDecoderFloat ($index: number, $value: $Ref<number>) : boolean
|
|
327
|
-
/** Sets a user-defined parameter of a custom ambisonic decoder effect that is attached to an AudioSource.
|
|
328
|
-
* @param $index Zero-based index of user-defined parameter to be set.
|
|
329
|
-
* @param $value New value of the user-defined parameter.
|
|
330
|
-
* @returns True, if the parameter could be set.
|
|
331
|
-
*/
|
|
332
|
-
public SetAmbisonicDecoderFloat ($index: number, $value: number) : boolean
|
|
333
|
-
public constructor ()
|
|
334
|
-
}
|
|
335
|
-
/** A container for audio data.
|
|
336
|
-
*/
|
|
337
|
-
class AudioClip extends UnityEngine.Audio.AudioResource
|
|
338
|
-
{
|
|
339
|
-
protected [__keep_incompatibility]: never;
|
|
340
|
-
/** The length of the audio clip in seconds. (Read Only)
|
|
341
|
-
*/
|
|
342
|
-
public get length(): number;
|
|
343
|
-
/** The length of the audio clip in samples. (Read Only)
|
|
344
|
-
*/
|
|
345
|
-
public get samples(): number;
|
|
346
|
-
/** The number of channels in the audio clip. (Read Only)
|
|
347
|
-
*/
|
|
348
|
-
public get channels(): number;
|
|
349
|
-
/** The sample frequency of the clip in Hertz. (Read Only)
|
|
350
|
-
*/
|
|
351
|
-
public get frequency(): number;
|
|
352
|
-
/** The load type of the clip (read-only).
|
|
353
|
-
*/
|
|
354
|
-
public get loadType(): UnityEngine.AudioClipLoadType;
|
|
355
|
-
/** Preloads audio data of the clip when the clip asset is loaded. When this flag is off, scripts have to call AudioClip.LoadAudioData() to load the data before the clip can be played. Properties like length, channels and format are available before the audio data has been loaded.
|
|
356
|
-
*/
|
|
357
|
-
public get preloadAudioData(): boolean;
|
|
358
|
-
/** Returns true if this audio clip is ambisonic (read-only).
|
|
359
|
-
*/
|
|
360
|
-
public get ambisonic(): boolean;
|
|
361
|
-
/** Corresponding to the "Load In Background" flag in the inspector, when this flag is set, the loading will happen delayed without blocking the main thread.
|
|
362
|
-
*/
|
|
363
|
-
public get loadInBackground(): boolean;
|
|
364
|
-
/** Returns the current load state of the audio data associated with an AudioClip.
|
|
365
|
-
*/
|
|
366
|
-
public get loadState(): UnityEngine.AudioDataLoadState;
|
|
367
|
-
/** Loads the audio data of a clip. Clips that have "Preload Audio Data" set will load the audio data automatically.
|
|
368
|
-
* @returns Returns true if loading succeeded.
|
|
369
|
-
*/
|
|
370
|
-
public LoadAudioData () : boolean
|
|
371
|
-
/** Unloads the audio data associated with the clip. This works only for AudioClips that are based on actual sound file assets.
|
|
372
|
-
* @returns Returns false if unloading failed.
|
|
373
|
-
*/
|
|
374
|
-
public UnloadAudioData () : boolean
|
|
375
|
-
/** Fills an array with sample data from the clip.
|
|
376
|
-
*/
|
|
377
|
-
public GetData ($data: System.Array$1<number>, $offsetSamples: number) : boolean
|
|
378
|
-
/** Set sample data in a clip.
|
|
379
|
-
*/
|
|
380
|
-
public SetData ($data: System.Array$1<number>, $offsetSamples: number) : boolean
|
|
381
|
-
/** Creates a user AudioClip with a name and with the given length in samples, channels and frequency.
|
|
382
|
-
* @param $name Name of clip.
|
|
383
|
-
* @param $lengthSamples Number of sample frames.
|
|
384
|
-
* @param $channels Number of channels per frame.
|
|
385
|
-
* @param $frequency Sample frequency of clip.
|
|
386
|
-
* @param $_3D Audio clip is played back in 3D.
|
|
387
|
-
* @param $stream True if clip is streamed, that is if the pcmreadercallback generates data on the fly.
|
|
388
|
-
* @param $pcmreadercallback This callback is invoked to generate a block of sample data. Non-streamed clips call this only once at creation time while streamed clips call this continuously.
|
|
389
|
-
* @param $pcmsetpositioncallback This callback is invoked whenever the clip loops or changes playback position.
|
|
390
|
-
* @returns A reference to the created AudioClip.
|
|
391
|
-
*/
|
|
392
|
-
public static Create ($name: string, $lengthSamples: number, $channels: number, $frequency: number, $stream: boolean) : UnityEngine.AudioClip
|
|
393
|
-
public static Create ($name: string, $lengthSamples: number, $channels: number, $frequency: number, $stream: boolean, $pcmreadercallback: UnityEngine.AudioClip.PCMReaderCallback) : UnityEngine.AudioClip
|
|
394
|
-
public static Create ($name: string, $lengthSamples: number, $channels: number, $frequency: number, $stream: boolean, $pcmreadercallback: UnityEngine.AudioClip.PCMReaderCallback, $pcmsetpositioncallback: UnityEngine.AudioClip.PCMSetPositionCallback) : UnityEngine.AudioClip
|
|
395
|
-
}
|
|
396
|
-
/** Gamepad audio output types.
|
|
397
|
-
*/
|
|
398
|
-
enum GamepadSpeakerOutputType
|
|
399
|
-
{ Speaker = 0, Vibration = 1, SecondaryVibration = 2 }
|
|
400
|
-
/** Describes when an AudioSource or AudioListener is updated.
|
|
401
|
-
*/
|
|
402
|
-
enum AudioVelocityUpdateMode
|
|
403
|
-
{ Auto = 0, Fixed = 1, Dynamic = 2 }
|
|
404
|
-
/** This defines the curve type of the different custom curves that can be queried and set within the AudioSource.
|
|
405
|
-
*/
|
|
406
|
-
enum AudioSourceCurveType
|
|
407
|
-
{ CustomRolloff = 0, SpatialBlend = 1, ReverbZoneMix = 2, Spread = 3 }
|
|
408
|
-
/** Rolloff modes that a 3D sound can have in an audio source.
|
|
409
|
-
*/
|
|
410
|
-
enum AudioRolloffMode
|
|
411
|
-
{ Logarithmic = 0, Linear = 1, Custom = 2 }
|
|
412
|
-
/** Spectrum analysis windowing types.
|
|
413
|
-
*/
|
|
414
|
-
enum FFTWindow
|
|
415
|
-
{ Rectangular = 0, Triangle = 1, Hamming = 2, Hanning = 3, Blackman = 4, BlackmanHarris = 5 }
|
|
416
|
-
/** The Audio Low Pass Filter passes low frequencies of an AudioSource or all sounds reaching an AudioListener, while removing frequencies higher than the Cutoff Frequency.
|
|
417
|
-
*/
|
|
418
|
-
class AudioLowPassFilter extends UnityEngine.Behaviour
|
|
419
|
-
{
|
|
420
|
-
protected [__keep_incompatibility]: never;
|
|
421
|
-
/** Returns or sets the current custom frequency cutoff curve.
|
|
422
|
-
*/
|
|
423
|
-
public get customCutoffCurve(): UnityEngine.AnimationCurve;
|
|
424
|
-
public set customCutoffCurve(value: UnityEngine.AnimationCurve);
|
|
425
|
-
/** Lowpass cutoff frequency in hz. 10.0 to 22000.0. Default = 5000.0.
|
|
426
|
-
*/
|
|
427
|
-
public get cutoffFrequency(): number;
|
|
428
|
-
public set cutoffFrequency(value: number);
|
|
429
|
-
/** Determines how much the filter's self-resonance is dampened.
|
|
430
|
-
*/
|
|
431
|
-
public get lowpassResonanceQ(): number;
|
|
432
|
-
public set lowpassResonanceQ(value: number);
|
|
433
|
-
public constructor ()
|
|
434
|
-
}
|
|
435
|
-
/** The Audio High Pass Filter passes high frequencies of an AudioSource, and cuts off signals with frequencies lower than the Cutoff Frequency.
|
|
436
|
-
*/
|
|
437
|
-
class AudioHighPassFilter extends UnityEngine.Behaviour
|
|
438
|
-
{
|
|
439
|
-
protected [__keep_incompatibility]: never;
|
|
440
|
-
/** Highpass cutoff frequency in hz. 10.0 to 22000.0. Default = 5000.0.
|
|
441
|
-
*/
|
|
442
|
-
public get cutoffFrequency(): number;
|
|
443
|
-
public set cutoffFrequency(value: number);
|
|
444
|
-
/** Determines how much the filter's self-resonance isdampened.
|
|
445
|
-
*/
|
|
446
|
-
public get highpassResonanceQ(): number;
|
|
447
|
-
public set highpassResonanceQ(value: number);
|
|
448
|
-
public constructor ()
|
|
449
|
-
}
|
|
450
|
-
/** The Audio Reverb Filter takes an Audio Clip and distorts it to create a custom reverb effect.
|
|
451
|
-
*/
|
|
452
|
-
class AudioReverbFilter extends UnityEngine.Behaviour
|
|
453
|
-
{
|
|
454
|
-
protected [__keep_incompatibility]: never;
|
|
455
|
-
/** Set/Get reverb preset properties.
|
|
456
|
-
*/
|
|
457
|
-
public get reverbPreset(): UnityEngine.AudioReverbPreset;
|
|
458
|
-
public set reverbPreset(value: UnityEngine.AudioReverbPreset);
|
|
459
|
-
/** Mix level of dry signal in output in millibels (mB). Ranges from -10000.0 to 0.0. Default is 0.
|
|
460
|
-
*/
|
|
461
|
-
public get dryLevel(): number;
|
|
462
|
-
public set dryLevel(value: number);
|
|
463
|
-
/** Room effect level at low frequencies in millibels (mB). Ranges from -10000.0 to 0.0. Default is 0.0.
|
|
464
|
-
*/
|
|
465
|
-
public get room(): number;
|
|
466
|
-
public set room(value: number);
|
|
467
|
-
/** Room effect high-frequency level re. low frequency level in millibels (mB). Ranges from -10000.0 to 0.0. Default is 0.0.
|
|
468
|
-
*/
|
|
469
|
-
public get roomHF(): number;
|
|
470
|
-
public set roomHF(value: number);
|
|
471
|
-
/** Reverberation decay time at low-frequencies in seconds. Ranges from 0.1 to 20.0. Default is 1.0.
|
|
472
|
-
*/
|
|
473
|
-
public get decayTime(): number;
|
|
474
|
-
public set decayTime(value: number);
|
|
475
|
-
/** Decay HF Ratio : High-frequency to low-frequency decay time ratio. Ranges from 0.1 to 2.0. Default is 0.5.
|
|
476
|
-
*/
|
|
477
|
-
public get decayHFRatio(): number;
|
|
478
|
-
public set decayHFRatio(value: number);
|
|
479
|
-
/** Early reflections level relative to room effect in millibels (mB). Ranges from -10000.0 to 1000.0. Default is -10000.0.
|
|
480
|
-
*/
|
|
481
|
-
public get reflectionsLevel(): number;
|
|
482
|
-
public set reflectionsLevel(value: number);
|
|
483
|
-
/** Late reverberation level relative to room effect in millibels (mB). Ranges from -10000.0 to 2000.0. Default is 0.0.
|
|
484
|
-
*/
|
|
485
|
-
public get reflectionsDelay(): number;
|
|
486
|
-
public set reflectionsDelay(value: number);
|
|
487
|
-
/** Late reverberation level relative to room effect in millibels (mB). Ranges from -10000.0 to 2000.0. Default is 0.0.
|
|
488
|
-
*/
|
|
489
|
-
public get reverbLevel(): number;
|
|
490
|
-
public set reverbLevel(value: number);
|
|
491
|
-
/** Late reverberation delay time relative to first reflection in seconds. Ranges from 0.0 to 0.1. Default is 0.04.
|
|
492
|
-
*/
|
|
493
|
-
public get reverbDelay(): number;
|
|
494
|
-
public set reverbDelay(value: number);
|
|
495
|
-
/** Reverberation diffusion (echo density) in percent. Ranges from 0.0 to 100.0. Default is 100.0.
|
|
496
|
-
*/
|
|
497
|
-
public get diffusion(): number;
|
|
498
|
-
public set diffusion(value: number);
|
|
499
|
-
/** Reverberation density (modal density) in percent. Ranges from 0.0 to 100.0. Default is 100.0.
|
|
500
|
-
*/
|
|
501
|
-
public get density(): number;
|
|
502
|
-
public set density(value: number);
|
|
503
|
-
/** Reference high frequency in hertz (Hz). Ranges from 1000.0 to 20000.0. Default is 5000.0.
|
|
504
|
-
*/
|
|
505
|
-
public get hfReference(): number;
|
|
506
|
-
public set hfReference(value: number);
|
|
507
|
-
/** Room effect low-frequency level in millibels (mB). Ranges from -10000.0 to 0.0. Default is 0.0.
|
|
508
|
-
*/
|
|
509
|
-
public get roomLF(): number;
|
|
510
|
-
public set roomLF(value: number);
|
|
511
|
-
/** Reference low-frequency in hertz (Hz). Ranges from 20.0 to 1000.0. Default is 250.0.
|
|
512
|
-
*/
|
|
513
|
-
public get lfReference(): number;
|
|
514
|
-
public set lfReference(value: number);
|
|
515
|
-
public constructor ()
|
|
516
|
-
}
|
|
517
|
-
/** Reverb presets used by the Reverb Zone class and the audio reverb filter.
|
|
518
|
-
*/
|
|
519
|
-
enum AudioReverbPreset
|
|
520
|
-
{ Off = 0, Generic = 1, PaddedCell = 2, Room = 3, Bathroom = 4, Livingroom = 5, Stoneroom = 6, Auditorium = 7, Concerthall = 8, Cave = 9, Arena = 10, Hangar = 11, CarpetedHallway = 12, Hallway = 13, StoneCorridor = 14, Alley = 15, Forest = 16, City = 17, Mountains = 18, Quarry = 19, Plain = 20, ParkingLot = 21, SewerPipe = 22, Underwater = 23, Drugged = 24, Dizzy = 25, Psychotic = 26, User = 27 }
|
|
521
|
-
/** Value describing the current load state of the audio data associated with an AudioClip.
|
|
522
|
-
*/
|
|
523
|
-
enum AudioDataLoadState
|
|
524
|
-
{ Unloaded = 0, Loading = 1, Loaded = 2, Failed = 3 }
|
|
525
|
-
/** An enum containing different compression types.
|
|
526
|
-
*/
|
|
527
|
-
enum AudioCompressionFormat
|
|
528
|
-
{ PCM = 0, Vorbis = 1, ADPCM = 2, MP3 = 3, VAG = 4, HEVAG = 5, XMA = 6, AAC = 7, GCADPCM = 8, ATRAC9 = 9 }
|
|
529
|
-
/** Determines how the audio clip is loaded in.
|
|
530
|
-
*/
|
|
531
|
-
enum AudioClipLoadType
|
|
532
|
-
{ DecompressOnLoad = 0, CompressedInMemory = 1, Streaming = 2 }
|
|
533
|
-
/** Representation of a listener in 3D space.
|
|
534
|
-
*/
|
|
535
|
-
class AudioListener extends UnityEngine.AudioBehaviour
|
|
536
|
-
{
|
|
537
|
-
protected [__keep_incompatibility]: never;
|
|
538
|
-
/** Controls the game sound volume (0.0 to 1.0).
|
|
539
|
-
*/
|
|
540
|
-
public static get volume(): number;
|
|
541
|
-
public static set volume(value: number);
|
|
542
|
-
/** The paused state of the audio system.
|
|
543
|
-
*/
|
|
544
|
-
public static get pause(): boolean;
|
|
545
|
-
public static set pause(value: boolean);
|
|
546
|
-
/** This lets you set whether the Audio Listener should be updated in the fixed or dynamic update.
|
|
547
|
-
*/
|
|
548
|
-
public get velocityUpdateMode(): UnityEngine.AudioVelocityUpdateMode;
|
|
549
|
-
public set velocityUpdateMode(value: UnityEngine.AudioVelocityUpdateMode);
|
|
550
|
-
/** Provides a block of the listener (master)'s output data.
|
|
551
|
-
* @param $samples The array to populate with audio samples. Its length must be a power of 2.
|
|
552
|
-
* @param $channel The channel to sample from.
|
|
553
|
-
*/
|
|
554
|
-
public static GetOutputData ($samples: System.Array$1<number>, $channel: number) : void
|
|
555
|
-
/** Provides a block of the listener (master)'s spectrum data.
|
|
556
|
-
* @param $samples The array to populate with audio samples. Its length must be a power of 2.
|
|
557
|
-
* @param $channel The channel to sample from.
|
|
558
|
-
* @param $window The FFTWindow type to use when sampling.
|
|
559
|
-
*/
|
|
560
|
-
public static GetSpectrumData ($samples: System.Array$1<number>, $channel: number, $window: UnityEngine.FFTWindow) : void
|
|
561
|
-
public constructor ()
|
|
562
|
-
}
|
|
563
|
-
/** Reverb Zones are used when you want to create location based ambient effects in the Scene.
|
|
564
|
-
*/
|
|
565
|
-
class AudioReverbZone extends UnityEngine.Behaviour
|
|
566
|
-
{
|
|
567
|
-
protected [__keep_incompatibility]: never;
|
|
568
|
-
/** The distance from the centerpoint that the reverb will have full effect at. Default = 10.0.
|
|
569
|
-
*/
|
|
570
|
-
public get minDistance(): number;
|
|
571
|
-
public set minDistance(value: number);
|
|
572
|
-
/** The distance from the centerpoint that the reverb will not have any effect. Default = 15.0.
|
|
573
|
-
*/
|
|
574
|
-
public get maxDistance(): number;
|
|
575
|
-
public set maxDistance(value: number);
|
|
576
|
-
/** Set/Get reverb preset properties.
|
|
577
|
-
*/
|
|
578
|
-
public get reverbPreset(): UnityEngine.AudioReverbPreset;
|
|
579
|
-
public set reverbPreset(value: UnityEngine.AudioReverbPreset);
|
|
580
|
-
/** Room effect level (at mid frequencies).
|
|
581
|
-
*/
|
|
582
|
-
public get room(): number;
|
|
583
|
-
public set room(value: number);
|
|
584
|
-
/** Relative room effect level at high frequencies.
|
|
585
|
-
*/
|
|
586
|
-
public get roomHF(): number;
|
|
587
|
-
public set roomHF(value: number);
|
|
588
|
-
/** Relative room effect level at low frequencies.
|
|
589
|
-
*/
|
|
590
|
-
public get roomLF(): number;
|
|
591
|
-
public set roomLF(value: number);
|
|
592
|
-
/** Reverberation decay time at mid frequencies.
|
|
593
|
-
*/
|
|
594
|
-
public get decayTime(): number;
|
|
595
|
-
public set decayTime(value: number);
|
|
596
|
-
/** High-frequency to mid-frequency decay time ratio.
|
|
597
|
-
*/
|
|
598
|
-
public get decayHFRatio(): number;
|
|
599
|
-
public set decayHFRatio(value: number);
|
|
600
|
-
/** Early reflections level relative to room effect.
|
|
601
|
-
*/
|
|
602
|
-
public get reflections(): number;
|
|
603
|
-
public set reflections(value: number);
|
|
604
|
-
/** Initial reflection delay time.
|
|
605
|
-
*/
|
|
606
|
-
public get reflectionsDelay(): number;
|
|
607
|
-
public set reflectionsDelay(value: number);
|
|
608
|
-
/** Late reverberation level relative to room effect.
|
|
609
|
-
*/
|
|
610
|
-
public get reverb(): number;
|
|
611
|
-
public set reverb(value: number);
|
|
612
|
-
/** Late reverberation delay time relative to initial reflection.
|
|
613
|
-
*/
|
|
614
|
-
public get reverbDelay(): number;
|
|
615
|
-
public set reverbDelay(value: number);
|
|
616
|
-
/** Reference high frequency (hz).
|
|
617
|
-
*/
|
|
618
|
-
public get HFReference(): number;
|
|
619
|
-
public set HFReference(value: number);
|
|
620
|
-
/** Reference low frequency (hz).
|
|
621
|
-
*/
|
|
622
|
-
public get LFReference(): number;
|
|
623
|
-
public set LFReference(value: number);
|
|
624
|
-
/** Value that controls the echo density in the late reverberation decay.
|
|
625
|
-
*/
|
|
626
|
-
public get diffusion(): number;
|
|
627
|
-
public set diffusion(value: number);
|
|
628
|
-
/** Value that controls the modal density in the late reverberation decay.
|
|
629
|
-
*/
|
|
630
|
-
public get density(): number;
|
|
631
|
-
public set density(value: number);
|
|
632
|
-
public constructor ()
|
|
633
|
-
}
|
|
634
|
-
/** The Audio Distortion Filter distorts the sound from an AudioSource or sounds reaching the AudioListener.
|
|
635
|
-
*/
|
|
636
|
-
class AudioDistortionFilter extends UnityEngine.Behaviour
|
|
637
|
-
{
|
|
638
|
-
protected [__keep_incompatibility]: never;
|
|
639
|
-
/** Distortion value. 0.0 to 1.0. Default = 0.5.
|
|
640
|
-
*/
|
|
641
|
-
public get distortionLevel(): number;
|
|
642
|
-
public set distortionLevel(value: number);
|
|
643
|
-
public constructor ()
|
|
644
|
-
}
|
|
645
|
-
/** The Audio Echo Filter repeats a sound after a given Delay, attenuating the repetitions based on the Decay Ratio.
|
|
646
|
-
*/
|
|
647
|
-
class AudioEchoFilter extends UnityEngine.Behaviour
|
|
648
|
-
{
|
|
649
|
-
protected [__keep_incompatibility]: never;
|
|
650
|
-
/** Echo delay in ms. 10 to 5000. Default = 500.
|
|
651
|
-
*/
|
|
652
|
-
public get delay(): number;
|
|
653
|
-
public set delay(value: number);
|
|
654
|
-
/** Echo decay per delay. 0 to 1. 1.0 = No decay, 0.0 = total decay (i.e. simple 1 line delay). Default = 0.5.
|
|
655
|
-
*/
|
|
656
|
-
public get decayRatio(): number;
|
|
657
|
-
public set decayRatio(value: number);
|
|
658
|
-
/** Volume of original signal to pass to output. 0.0 to 1.0. Default = 1.0.
|
|
659
|
-
*/
|
|
660
|
-
public get dryMix(): number;
|
|
661
|
-
public set dryMix(value: number);
|
|
662
|
-
/** Volume of echo signal to pass to output. 0.0 to 1.0. Default = 1.0.
|
|
663
|
-
*/
|
|
664
|
-
public get wetMix(): number;
|
|
665
|
-
public set wetMix(value: number);
|
|
666
|
-
public constructor ()
|
|
667
|
-
}
|
|
668
|
-
/** The Audio Chorus Filter takes an Audio Clip and processes it creating a chorus effect.
|
|
669
|
-
*/
|
|
670
|
-
class AudioChorusFilter extends UnityEngine.Behaviour
|
|
671
|
-
{
|
|
672
|
-
protected [__keep_incompatibility]: never;
|
|
673
|
-
/** Volume of original signal to pass to output. 0.0 to 1.0. Default = 0.5.
|
|
674
|
-
*/
|
|
675
|
-
public get dryMix(): number;
|
|
676
|
-
public set dryMix(value: number);
|
|
677
|
-
/** Volume of 1st chorus tap. 0.0 to 1.0. Default = 0.5.
|
|
678
|
-
*/
|
|
679
|
-
public get wetMix1(): number;
|
|
680
|
-
public set wetMix1(value: number);
|
|
681
|
-
/** Volume of 2nd chorus tap. This tap is 90 degrees out of phase of the first tap. 0.0 to 1.0. Default = 0.5.
|
|
682
|
-
*/
|
|
683
|
-
public get wetMix2(): number;
|
|
684
|
-
public set wetMix2(value: number);
|
|
685
|
-
/** Volume of 3rd chorus tap. This tap is 90 degrees out of phase of the second tap. 0.0 to 1.0. Default = 0.5.
|
|
686
|
-
*/
|
|
687
|
-
public get wetMix3(): number;
|
|
688
|
-
public set wetMix3(value: number);
|
|
689
|
-
/** Chorus delay in ms. 0.1 to 100.0. Default = 40.0 ms.
|
|
690
|
-
*/
|
|
691
|
-
public get delay(): number;
|
|
692
|
-
public set delay(value: number);
|
|
693
|
-
/** Chorus modulation rate in hz. 0.0 to 20.0. Default = 0.8 hz.
|
|
694
|
-
*/
|
|
695
|
-
public get rate(): number;
|
|
696
|
-
public set rate(value: number);
|
|
697
|
-
/** Chorus modulation depth. 0.0 to 1.0. Default = 0.03.
|
|
698
|
-
*/
|
|
699
|
-
public get depth(): number;
|
|
700
|
-
public set depth(value: number);
|
|
701
|
-
public constructor ()
|
|
702
|
-
}
|
|
703
|
-
/** Use this class to record to an AudioClip using a connected microphone.
|
|
704
|
-
*/
|
|
705
|
-
class Microphone extends System.Object
|
|
706
|
-
{
|
|
707
|
-
protected [__keep_incompatibility]: never;
|
|
708
|
-
/** A list of available microphone devices, identified by name.
|
|
709
|
-
*/
|
|
710
|
-
public static get devices(): System.Array$1<string>;
|
|
711
|
-
/** Start Recording with device.
|
|
712
|
-
* @param $deviceName The name of the device.
|
|
713
|
-
* @param $loop Indicates whether the recording should continue recording if lengthSec is reached, and wrap around and record from the beginning of the AudioClip.
|
|
714
|
-
* @param $lengthSec Is the length of the AudioClip produced by the recording.
|
|
715
|
-
* @param $frequency The sample rate of the AudioClip produced by the recording.
|
|
716
|
-
* @returns The function returns null if the recording fails to start.
|
|
717
|
-
*/
|
|
718
|
-
public static Start ($deviceName: string, $loop: boolean, $lengthSec: number, $frequency: number) : UnityEngine.AudioClip
|
|
719
|
-
/** Stops recording.
|
|
720
|
-
* @param $deviceName The name of the device.
|
|
721
|
-
*/
|
|
722
|
-
public static End ($deviceName: string) : void
|
|
723
|
-
/** Query if a device is currently recording.
|
|
724
|
-
* @param $deviceName The name of the device.
|
|
725
|
-
*/
|
|
726
|
-
public static IsRecording ($deviceName: string) : boolean
|
|
727
|
-
/** Get the position in samples of the recording.
|
|
728
|
-
* @param $deviceName The name of the device.
|
|
729
|
-
*/
|
|
730
|
-
public static GetPosition ($deviceName: string) : number
|
|
731
|
-
/** Get the frequency capabilities of a device.
|
|
732
|
-
* @param $deviceName The name of the device.
|
|
733
|
-
* @param $minFreq Returns the minimum sampling frequency of the device.
|
|
734
|
-
* @param $maxFreq Returns the maximum sampling frequency of the device.
|
|
735
|
-
*/
|
|
736
|
-
public static GetDeviceCaps ($deviceName: string, $minFreq: $Ref<number>, $maxFreq: $Ref<number>) : void
|
|
737
|
-
public constructor ()
|
|
738
|
-
}
|
|
739
|
-
/** Allow recording the main output of the game or specific groups in the AudioMixer.
|
|
740
|
-
*/
|
|
741
|
-
class AudioRenderer extends System.Object
|
|
742
|
-
{
|
|
743
|
-
protected [__keep_incompatibility]: never;
|
|
744
|
-
/** Enters audio recording mode. After this Unity will output silence until AudioRenderer.Stop is called.
|
|
745
|
-
* @returns True if the engine was switched into output recording mode. False if it is already recording.
|
|
746
|
-
*/
|
|
747
|
-
public static Start () : boolean
|
|
748
|
-
/** Exits audio recording mode. After this audio output will be audible again.
|
|
749
|
-
* @returns True if the engine was recording when this function was called.
|
|
750
|
-
*/
|
|
751
|
-
public static Stop () : boolean
|
|
752
|
-
/** Returns the number of samples available since the last time AudioRenderer.Render was called. This is dependent on the frame capture rate.
|
|
753
|
-
* @returns Number of samples available since last recorded frame.
|
|
754
|
-
*/
|
|
755
|
-
public static GetSampleCountForCaptureFrame () : number
|
|
756
|
-
public static Render ($buffer: Unity.Collections.NativeArray$1<number>) : boolean
|
|
757
|
-
public constructor ()
|
|
758
|
-
}
|
|
759
|
-
/** MovieTexture has been removed. Use VideoPlayer instead.
|
|
760
|
-
*/
|
|
761
|
-
class MovieTexture extends UnityEngine.Texture
|
|
762
|
-
{
|
|
763
|
-
protected [__keep_incompatibility]: never;
|
|
764
|
-
}
|
|
765
|
-
enum WebCamFlags
|
|
766
|
-
{ FrontFacing = 1, AutoFocusPointSupported = 2 }
|
|
767
|
-
/** Enum representing the different types of web camera device.
|
|
768
|
-
*/
|
|
769
|
-
enum WebCamKind
|
|
770
|
-
{ WideAngle = 1, Telephoto = 2, ColorAndDepth = 3, UltraWideAngle = 4 }
|
|
771
|
-
/** A structure describing the webcam device.
|
|
772
|
-
*/
|
|
773
|
-
class WebCamDevice extends System.ValueType
|
|
774
|
-
{
|
|
775
|
-
protected [__keep_incompatibility]: never;
|
|
776
|
-
/** A human-readable name of the device. Varies across different systems.
|
|
777
|
-
*/
|
|
778
|
-
public get name(): string;
|
|
779
|
-
/** True if camera faces the same direction a screen does, false otherwise.
|
|
780
|
-
*/
|
|
781
|
-
public get isFrontFacing(): boolean;
|
|
782
|
-
/** Property of type WebCamKind denoting the kind of webcam device.
|
|
783
|
-
*/
|
|
784
|
-
public get kind(): UnityEngine.WebCamKind;
|
|
785
|
-
/** A string identifier used to create a depth data based WebCamTexture.
|
|
786
|
-
*/
|
|
787
|
-
public get depthCameraName(): string;
|
|
788
|
-
/** Returns true if the camera supports automatic focusing on points of interest and false otherwise.
|
|
789
|
-
*/
|
|
790
|
-
public get isAutoFocusPointSupported(): boolean;
|
|
791
|
-
/** Possible WebCamTexture resolutions for this device.
|
|
792
|
-
*/
|
|
793
|
-
public get availableResolutions(): System.Array$1<UnityEngine.Resolution>;
|
|
794
|
-
}
|
|
795
|
-
/** WebCam Textures are textures onto which the live video input is rendered.
|
|
796
|
-
*/
|
|
797
|
-
class WebCamTexture extends UnityEngine.Texture
|
|
798
|
-
{
|
|
799
|
-
protected [__keep_incompatibility]: never;
|
|
800
|
-
/** Return a list of available devices.
|
|
801
|
-
*/
|
|
802
|
-
public static get devices(): System.Array$1<UnityEngine.WebCamDevice>;
|
|
803
|
-
/** Returns if the camera is currently playing.
|
|
804
|
-
*/
|
|
805
|
-
public get isPlaying(): boolean;
|
|
806
|
-
/** Set this to specify the name of the device to use.
|
|
807
|
-
*/
|
|
808
|
-
public get deviceName(): string;
|
|
809
|
-
public set deviceName(value: string);
|
|
810
|
-
/** Set the requested frame rate of the camera device (in frames per second).
|
|
811
|
-
*/
|
|
812
|
-
public get requestedFPS(): number;
|
|
813
|
-
public set requestedFPS(value: number);
|
|
814
|
-
/** Set the requested width of the camera device.
|
|
815
|
-
*/
|
|
816
|
-
public get requestedWidth(): number;
|
|
817
|
-
public set requestedWidth(value: number);
|
|
818
|
-
/** Set the requested height of the camera device.
|
|
819
|
-
*/
|
|
820
|
-
public get requestedHeight(): number;
|
|
821
|
-
public set requestedHeight(value: number);
|
|
822
|
-
/** Returns an clockwise angle (in degrees), which can be used to rotate a polygon so camera contents are shown in correct orientation.
|
|
823
|
-
*/
|
|
824
|
-
public get videoRotationAngle(): number;
|
|
825
|
-
/** Returns if the texture image is vertically flipped.
|
|
826
|
-
*/
|
|
827
|
-
public get videoVerticallyMirrored(): boolean;
|
|
828
|
-
/** Did the video buffer update this frame?
|
|
829
|
-
*/
|
|
830
|
-
public get didUpdateThisFrame(): boolean;
|
|
831
|
-
/** This property allows you to set/get the auto focus point of the camera. This works only on Android and iOS devices.
|
|
832
|
-
*/
|
|
833
|
-
public get autoFocusPoint(): UnityEngine.Vector2 | null;
|
|
834
|
-
public set autoFocusPoint(value: UnityEngine.Vector2 | null);
|
|
835
|
-
/** This property is true if the texture is based on depth data.
|
|
836
|
-
*/
|
|
837
|
-
public get isDepth(): boolean;
|
|
838
|
-
/** Starts the camera.
|
|
839
|
-
*/
|
|
840
|
-
public Play () : void
|
|
841
|
-
/** Pauses the camera.
|
|
842
|
-
*/
|
|
843
|
-
public Pause () : void
|
|
844
|
-
/** Stops the camera.
|
|
845
|
-
*/
|
|
846
|
-
public Stop () : void
|
|
847
|
-
/** Gets the pixel color at coordinates (x, y).
|
|
848
|
-
* @param $x The x coordinate of the pixel to get. The range is 0 through the (texture width - 1).
|
|
849
|
-
* @param $y The y coordinate of the pixel to get. The range is 0 through the (texture height - 1).
|
|
850
|
-
* @returns The pixel color.
|
|
851
|
-
*/
|
|
852
|
-
public GetPixel ($x: number, $y: number) : UnityEngine.Color
|
|
853
|
-
/** Gets the pixel color data for a mipmap level as Color structs.
|
|
854
|
-
* @returns An array that contains the pixel colors.
|
|
855
|
-
*/
|
|
856
|
-
public GetPixels () : System.Array$1<UnityEngine.Color>
|
|
857
|
-
/** Gets the pixel color data for part of the texture as Color structs.
|
|
858
|
-
* @param $x The starting x position of the section to fetch.
|
|
859
|
-
* @param $y The starting y position of the section to fetch.
|
|
860
|
-
* @param $blockWidth The width of the section to fetch.
|
|
861
|
-
* @param $blockHeight The height of the section to fetch.
|
|
862
|
-
* @returns An array that contains the pixel colors.
|
|
863
|
-
*/
|
|
864
|
-
public GetPixels ($x: number, $y: number, $blockWidth: number, $blockHeight: number) : System.Array$1<UnityEngine.Color>
|
|
865
|
-
public GetPixels32 () : System.Array$1<UnityEngine.Color32>
|
|
866
|
-
/** Gets the pixel color data for a mipmap level as Color32 structs.
|
|
867
|
-
* @param $colors An optional array to write the pixel data to.
|
|
868
|
-
* @returns An array that contains the pixel colors.
|
|
869
|
-
*/
|
|
870
|
-
public GetPixels32 ($colors: System.Array$1<UnityEngine.Color32>) : System.Array$1<UnityEngine.Color32>
|
|
871
|
-
public constructor ($deviceName: string, $requestedWidth: number, $requestedHeight: number, $requestedFPS: number)
|
|
872
|
-
public constructor ($deviceName: string, $requestedWidth: number, $requestedHeight: number)
|
|
873
|
-
public constructor ($deviceName: string)
|
|
874
|
-
public constructor ($requestedWidth: number, $requestedHeight: number, $requestedFPS: number)
|
|
875
|
-
public constructor ($requestedWidth: number, $requestedHeight: number)
|
|
876
|
-
public constructor ()
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
namespace UnityEngine.AudioSettings {
|
|
880
|
-
interface AudioConfigurationChangeHandler
|
|
881
|
-
{
|
|
882
|
-
(deviceWasChanged: boolean) : void;
|
|
883
|
-
Invoke?: (deviceWasChanged: boolean) => void;
|
|
884
|
-
}
|
|
885
|
-
var AudioConfigurationChangeHandler: { new (func: (deviceWasChanged: boolean) => void): AudioConfigurationChangeHandler; }
|
|
886
|
-
class Mobile extends System.Object
|
|
887
|
-
{
|
|
888
|
-
protected [__keep_incompatibility]: never;
|
|
889
|
-
public static get muteState(): boolean;
|
|
890
|
-
public static get stopAudioOutputOnMute(): boolean;
|
|
891
|
-
public static set stopAudioOutputOnMute(value: boolean);
|
|
892
|
-
public static get audioOutputStarted(): boolean;
|
|
893
|
-
public static add_OnMuteStateChanged ($value: System.Action$1<boolean>) : void
|
|
894
|
-
public static remove_OnMuteStateChanged ($value: System.Action$1<boolean>) : void
|
|
895
|
-
public static StartAudioOutput () : void
|
|
896
|
-
public static StopAudioOutput () : void
|
|
897
|
-
}
|
|
898
|
-
}
|
|
899
|
-
namespace UnityEngine.Audio {
|
|
900
|
-
/** Represents an audio resource asset that you can play through an AudioSource.
|
|
901
|
-
*/
|
|
902
|
-
class AudioResource extends UnityEngine.Object
|
|
903
|
-
{
|
|
904
|
-
protected [__keep_incompatibility]: never;
|
|
905
|
-
}
|
|
906
|
-
/** Object representing a group in the mixer.
|
|
907
|
-
*/
|
|
908
|
-
class AudioMixerGroup extends UnityEngine.Object
|
|
909
|
-
{
|
|
910
|
-
protected [__keep_incompatibility]: never;
|
|
911
|
-
public get audioMixer(): UnityEngine.Audio.AudioMixer;
|
|
912
|
-
}
|
|
913
|
-
/** An implementation of IPlayable that controls an AudioClip.
|
|
914
|
-
*/
|
|
915
|
-
class AudioClipPlayable extends System.ValueType implements UnityEngine.Playables.IPlayable, System.IEquatable$1<UnityEngine.Audio.AudioClipPlayable>
|
|
916
|
-
{
|
|
917
|
-
protected [__keep_incompatibility]: never;
|
|
918
|
-
/** Creates an AudioClipPlayable in the PlayableGraph.
|
|
919
|
-
* @param $graph The PlayableGraph that will contain the new AnimationLayerMixerPlayable.
|
|
920
|
-
* @param $clip The AudioClip that will be added in the PlayableGraph.
|
|
921
|
-
* @param $looping True if the clip should loop, false otherwise.
|
|
922
|
-
* @returns A AudioClipPlayable linked to the PlayableGraph.
|
|
923
|
-
*/
|
|
924
|
-
public static Create ($graph: UnityEngine.Playables.PlayableGraph, $clip: UnityEngine.AudioClip, $looping: boolean) : UnityEngine.Audio.AudioClipPlayable
|
|
925
|
-
public GetHandle () : UnityEngine.Playables.PlayableHandle
|
|
926
|
-
public static op_Implicit ($playable: UnityEngine.Audio.AudioClipPlayable) : UnityEngine.Playables.Playable
|
|
927
|
-
public static op_Explicit ($playable: UnityEngine.Playables.Playable) : UnityEngine.Audio.AudioClipPlayable
|
|
928
|
-
public Equals ($other: UnityEngine.Audio.AudioClipPlayable) : boolean
|
|
929
|
-
public GetClip () : UnityEngine.AudioClip
|
|
930
|
-
public SetClip ($value: UnityEngine.AudioClip) : void
|
|
931
|
-
public GetLooped () : boolean
|
|
932
|
-
public SetLooped ($value: boolean) : void
|
|
933
|
-
public IsChannelPlaying () : boolean
|
|
934
|
-
public GetStartDelay () : number
|
|
935
|
-
public GetPauseDelay () : number
|
|
936
|
-
public Seek ($startTime: number, $startDelay: number) : void
|
|
937
|
-
public Seek ($startTime: number, $startDelay: number, $duration: number) : void
|
|
938
|
-
}
|
|
939
|
-
/** The mode in which an AudioMixer should update its time.
|
|
940
|
-
*/
|
|
941
|
-
enum AudioMixerUpdateMode
|
|
942
|
-
{ Normal = 0, UnscaledTime = 1 }
|
|
943
|
-
/** AudioMixer asset.
|
|
944
|
-
*/
|
|
945
|
-
class AudioMixer extends UnityEngine.Object
|
|
946
|
-
{
|
|
947
|
-
protected [__keep_incompatibility]: never;
|
|
948
|
-
/** Routing target.
|
|
949
|
-
*/
|
|
950
|
-
public get outputAudioMixerGroup(): UnityEngine.Audio.AudioMixerGroup;
|
|
951
|
-
public set outputAudioMixerGroup(value: UnityEngine.Audio.AudioMixerGroup);
|
|
952
|
-
/** How time should progress for this AudioMixer. Used during Snapshot transitions.
|
|
953
|
-
*/
|
|
954
|
-
public get updateMode(): UnityEngine.Audio.AudioMixerUpdateMode;
|
|
955
|
-
public set updateMode(value: UnityEngine.Audio.AudioMixerUpdateMode);
|
|
956
|
-
/** The name must be an exact match.
|
|
957
|
-
* @param $name Name of snapshot object to be returned.
|
|
958
|
-
* @returns The snapshot identified by the name.
|
|
959
|
-
*/
|
|
960
|
-
public FindSnapshot ($name: string) : UnityEngine.Audio.AudioMixerSnapshot
|
|
961
|
-
/** Connected groups in the mixer form a path from the mixer's master group to the leaves. This path has the format Master GroupChild of Master GroupGrandchild of Master Group, and so on. For example, in the hierarchy below, the group DROPS has the path MasterWATERDROPS. To return only the group called DROPS, enter DROPS. The substring MasterAMBIENCE returns three groups, AMBIENCECROWD, AMBIENCEROAD, and AMBIENCE. The substring R would return both ROAD and RIVER.
|
|
962
|
-
* @param $subPath Path sub-strings to match with.
|
|
963
|
-
* @returns Groups in the mixer whose paths match the specified search path.
|
|
964
|
-
*/
|
|
965
|
-
public FindMatchingGroups ($subPath: string) : System.Array$1<UnityEngine.Audio.AudioMixerGroup>
|
|
966
|
-
/** Transitions to a weighted mixture of the snapshots specified. This can be used for games that specify the game state as a continuum between states or for interpolating snapshots from a triangulated map location.
|
|
967
|
-
* @param $snapshots The set of snapshots to be mixed.
|
|
968
|
-
* @param $weights The mix weights for the snapshots specified.
|
|
969
|
-
* @param $timeToReach Relative time after which the mixture should be reached from any current state.
|
|
970
|
-
*/
|
|
971
|
-
public TransitionToSnapshots ($snapshots: System.Array$1<UnityEngine.Audio.AudioMixerSnapshot>, $weights: System.Array$1<number>, $timeToReach: number) : void
|
|
972
|
-
/** Sets the value of the exposed parameter specified. When a parameter is exposed, it is not controlled by mixer snapshots. You can only change the parameter with this function.
|
|
973
|
-
* @param $name The name of an exposed Audio Mixer group parameter. To expose a parameter, go to the Audio Mixer group's Inspector window, right click the parameter you want to expose, and choose Expose [parameter name] to script.
|
|
974
|
-
* @param $value Use to set the exposed Audio Mixer group parameter to a new value.
|
|
975
|
-
* @returns Returns false if the exposed parameter was not found or snapshots are currently being edited.
|
|
976
|
-
*/
|
|
977
|
-
public SetFloat ($name: string, $value: number) : boolean
|
|
978
|
-
/** Resets an exposed parameter to its initial value.
|
|
979
|
-
* @param $name Exposed parameter.
|
|
980
|
-
* @returns Returns false if the parameter was not found or could not be set.
|
|
981
|
-
*/
|
|
982
|
-
public ClearFloat ($name: string) : boolean
|
|
983
|
-
/** Returns the value of the exposed parameter specified. If the parameter doesn't exist the function returns false. Prior to calling SetFloat and after ClearFloat has been called on this parameter the value returned will be that of the current snapshot or snapshot transition.
|
|
984
|
-
* @param $name Name of exposed parameter.
|
|
985
|
-
* @param $value Return value of exposed parameter.
|
|
986
|
-
* @returns Returns false if the exposed parameter specified doesn't exist.
|
|
987
|
-
*/
|
|
988
|
-
public GetFloat ($name: string, $value: $Ref<number>) : boolean
|
|
989
|
-
}
|
|
990
|
-
/** Object representing a snapshot in the mixer.
|
|
991
|
-
*/
|
|
992
|
-
class AudioMixerSnapshot extends UnityEngine.Object
|
|
993
|
-
{
|
|
994
|
-
protected [__keep_incompatibility]: never;
|
|
995
|
-
public get audioMixer(): UnityEngine.Audio.AudioMixer;
|
|
996
|
-
/** Performs an interpolated transition towards this snapshot over the time interval specified.
|
|
997
|
-
* @param $timeToReach Relative time after which this snapshot should be reached from any current state.
|
|
998
|
-
*/
|
|
999
|
-
public TransitionTo ($timeToReach: number) : void
|
|
1000
|
-
}
|
|
1001
|
-
/** An implementation of IPlayable that controls an audio mixer.
|
|
1002
|
-
*/
|
|
1003
|
-
class AudioMixerPlayable extends System.ValueType implements UnityEngine.Playables.IPlayable, System.IEquatable$1<UnityEngine.Audio.AudioMixerPlayable>
|
|
1004
|
-
{
|
|
1005
|
-
protected [__keep_incompatibility]: never;
|
|
1006
|
-
public static Create ($graph: UnityEngine.Playables.PlayableGraph, $inputCount?: number, $normalizeInputVolumes?: boolean) : UnityEngine.Audio.AudioMixerPlayable
|
|
1007
|
-
public GetHandle () : UnityEngine.Playables.PlayableHandle
|
|
1008
|
-
public static op_Implicit ($playable: UnityEngine.Audio.AudioMixerPlayable) : UnityEngine.Playables.Playable
|
|
1009
|
-
public static op_Explicit ($playable: UnityEngine.Playables.Playable) : UnityEngine.Audio.AudioMixerPlayable
|
|
1010
|
-
public Equals ($other: UnityEngine.Audio.AudioMixerPlayable) : boolean
|
|
1011
|
-
}
|
|
1012
|
-
/** A PlayableBinding that contains information representing an AudioPlayableOutput.
|
|
1013
|
-
*/
|
|
1014
|
-
class AudioPlayableBinding extends System.Object
|
|
1015
|
-
{
|
|
1016
|
-
protected [__keep_incompatibility]: never;
|
|
1017
|
-
/** Creates a PlayableBinding that contains information representing an AudioPlayableOutput.
|
|
1018
|
-
* @param $key A reference to a UnityEngine.Object that acts as a key for this binding.
|
|
1019
|
-
* @param $name The name of the AudioPlayableOutput.
|
|
1020
|
-
* @returns Returns a PlayableBinding that contains information that is used to create an AudioPlayableOutput.
|
|
1021
|
-
*/
|
|
1022
|
-
public static Create ($name: string, $key: UnityEngine.Object) : UnityEngine.Playables.PlayableBinding
|
|
1023
|
-
}
|
|
1024
|
-
/** A IPlayableOutput implementation that will be used to play audio.
|
|
1025
|
-
*/
|
|
1026
|
-
class AudioPlayableOutput extends System.ValueType implements UnityEngine.Playables.IPlayableOutput
|
|
1027
|
-
{
|
|
1028
|
-
protected [__keep_incompatibility]: never;
|
|
1029
|
-
/** Returns an invalid AudioPlayableOutput.
|
|
1030
|
-
*/
|
|
1031
|
-
public static get Null(): UnityEngine.Audio.AudioPlayableOutput;
|
|
1032
|
-
/** Creates an AudioPlayableOutput in the PlayableGraph.
|
|
1033
|
-
* @param $graph The PlayableGraph that will contain the AnimationPlayableOutput.
|
|
1034
|
-
* @param $name The name of the output.
|
|
1035
|
-
* @param $target The AudioSource that will play the AudioPlayableOutput source Playable.
|
|
1036
|
-
* @returns A new AudioPlayableOutput attached to the PlayableGraph.
|
|
1037
|
-
*/
|
|
1038
|
-
public static Create ($graph: UnityEngine.Playables.PlayableGraph, $name: string, $target: UnityEngine.AudioSource) : UnityEngine.Audio.AudioPlayableOutput
|
|
1039
|
-
public GetHandle () : UnityEngine.Playables.PlayableOutputHandle
|
|
1040
|
-
public static op_Implicit ($output: UnityEngine.Audio.AudioPlayableOutput) : UnityEngine.Playables.PlayableOutput
|
|
1041
|
-
public static op_Explicit ($output: UnityEngine.Playables.PlayableOutput) : UnityEngine.Audio.AudioPlayableOutput
|
|
1042
|
-
public GetTarget () : UnityEngine.AudioSource
|
|
1043
|
-
public SetTarget ($value: UnityEngine.AudioSource) : void
|
|
1044
|
-
/** Gets the state of output playback when seeking.
|
|
1045
|
-
* @returns Returns true if the output plays when seeking. Returns false otherwise.
|
|
1046
|
-
*/
|
|
1047
|
-
public GetEvaluateOnSeek () : boolean
|
|
1048
|
-
/** Controls whether the output should play when seeking.
|
|
1049
|
-
* @param $value Set to true to play the output when seeking. Set to false to disable audio scrubbing on this output. Default is true.
|
|
1050
|
-
*/
|
|
1051
|
-
public SetEvaluateOnSeek ($value: boolean) : void
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
namespace UnityEngine.AudioClip {
|
|
1055
|
-
interface PCMReaderCallback
|
|
1056
|
-
{
|
|
1057
|
-
(data: System.Array$1<number>) : void;
|
|
1058
|
-
Invoke?: (data: System.Array$1<number>) => void;
|
|
1059
|
-
}
|
|
1060
|
-
var PCMReaderCallback: { new (func: (data: System.Array$1<number>) => void): PCMReaderCallback; }
|
|
1061
|
-
interface PCMSetPositionCallback
|
|
1062
|
-
{
|
|
1063
|
-
(position: number) : void;
|
|
1064
|
-
Invoke?: (position: number) => void;
|
|
1065
|
-
}
|
|
1066
|
-
var PCMSetPositionCallback: { new (func: (position: number) => void): PCMSetPositionCallback; }
|
|
1067
|
-
}
|
|
1068
|
-
namespace UnityEngine.Experimental.Audio {
|
|
1069
|
-
/** Provides access to the audio samples generated by Unity objects such as VideoPlayer.
|
|
1070
|
-
*/
|
|
1071
|
-
class AudioSampleProvider extends System.Object implements System.IDisposable
|
|
1072
|
-
{
|
|
1073
|
-
protected [__keep_incompatibility]: never;
|
|
1074
|
-
/** Unique identifier for this instance.
|
|
1075
|
-
*/
|
|
1076
|
-
public get id(): number;
|
|
1077
|
-
/** Index of the track in the object that created this provider.
|
|
1078
|
-
*/
|
|
1079
|
-
public get trackIndex(): number;
|
|
1080
|
-
/** Object where this provider came from.
|
|
1081
|
-
*/
|
|
1082
|
-
public get owner(): UnityEngine.Object;
|
|
1083
|
-
/** True if the object is valid.
|
|
1084
|
-
*/
|
|
1085
|
-
public get valid(): boolean;
|
|
1086
|
-
/** The number of audio channels per sample frame.
|
|
1087
|
-
*/
|
|
1088
|
-
public get channelCount(): number;
|
|
1089
|
-
/** The expected playback rate for the sample frames produced by this class.
|
|
1090
|
-
*/
|
|
1091
|
-
public get sampleRate(): number;
|
|
1092
|
-
/** The maximum number of sample frames that can be accumulated inside the internal buffer before an overflow event is emitted.
|
|
1093
|
-
*/
|
|
1094
|
-
public get maxSampleFrameCount(): number;
|
|
1095
|
-
/** Number of sample frames available for consuming with Experimental.Audio.AudioSampleProvider.ConsumeSampleFrames.
|
|
1096
|
-
*/
|
|
1097
|
-
public get availableSampleFrameCount(): number;
|
|
1098
|
-
/** Number of sample frames that can still be written to by the sample producer before overflowing.
|
|
1099
|
-
*/
|
|
1100
|
-
public get freeSampleFrameCount(): number;
|
|
1101
|
-
/** Then the free sample count falls below this threshold, the Experimental.Audio.AudioSampleProvider.sampleFramesAvailable event and associated native is emitted.
|
|
1102
|
-
*/
|
|
1103
|
-
public get freeSampleFrameCountLowThreshold(): number;
|
|
1104
|
-
public set freeSampleFrameCountLowThreshold(value: number);
|
|
1105
|
-
/** Enables the Experimental.Audio.AudioSampleProvider.sampleFramesAvailable events.
|
|
1106
|
-
*/
|
|
1107
|
-
public get enableSampleFramesAvailableEvents(): boolean;
|
|
1108
|
-
public set enableSampleFramesAvailableEvents(value: boolean);
|
|
1109
|
-
/** If true, buffers produced by ConsumeSampleFrames will get padded when silence if there are less available than asked for. Otherwise, the extra sample frames in the buffer will be left unchanged.
|
|
1110
|
-
*/
|
|
1111
|
-
public get enableSilencePadding(): boolean;
|
|
1112
|
-
public set enableSilencePadding(value: boolean);
|
|
1113
|
-
/** Pointer to the native function that provides access to audio sample frames.
|
|
1114
|
-
*/
|
|
1115
|
-
public static get consumeSampleFramesNativeFunction(): UnityEngine.Experimental.Audio.AudioSampleProvider.ConsumeSampleFramesNativeFunction;
|
|
1116
|
-
/** Release internal resources. Inherited from IDisposable.
|
|
1117
|
-
*/
|
|
1118
|
-
public Dispose () : void
|
|
1119
|
-
public ConsumeSampleFrames ($sampleFrames: Unity.Collections.NativeArray$1<number>) : number
|
|
1120
|
-
public add_sampleFramesAvailable ($value: UnityEngine.Experimental.Audio.AudioSampleProvider.SampleFramesHandler) : void
|
|
1121
|
-
public remove_sampleFramesAvailable ($value: UnityEngine.Experimental.Audio.AudioSampleProvider.SampleFramesHandler) : void
|
|
1122
|
-
public add_sampleFramesOverflow ($value: UnityEngine.Experimental.Audio.AudioSampleProvider.SampleFramesHandler) : void
|
|
1123
|
-
public remove_sampleFramesOverflow ($value: UnityEngine.Experimental.Audio.AudioSampleProvider.SampleFramesHandler) : void
|
|
1124
|
-
public SetSampleFramesAvailableNativeHandler ($handler: UnityEngine.Experimental.Audio.AudioSampleProvider.SampleFramesEventNativeFunction, $userData: System.IntPtr) : void
|
|
1125
|
-
/** Clear the native handler set with Experimental.Audio.AudioSampleProvider.SetSampleFramesAvailableNativeHandler.
|
|
1126
|
-
*/
|
|
1127
|
-
public ClearSampleFramesAvailableNativeHandler () : void
|
|
1128
|
-
public SetSampleFramesOverflowNativeHandler ($handler: UnityEngine.Experimental.Audio.AudioSampleProvider.SampleFramesEventNativeFunction, $userData: System.IntPtr) : void
|
|
1129
|
-
/** Clear the native handler set with Experimental.Audio.AudioSampleProvider.SetSampleFramesOverflowNativeHandler.
|
|
1130
|
-
*/
|
|
1131
|
-
public ClearSampleFramesOverflowNativeHandler () : void
|
|
1132
|
-
}
|
|
1133
|
-
}
|
|
1134
|
-
namespace UnityEngine.Experimental.Audio.AudioSampleProvider {
|
|
1135
|
-
interface ConsumeSampleFramesNativeFunction
|
|
1136
|
-
{
|
|
1137
|
-
(providerId: number, interleavedSampleFrames: System.IntPtr, sampleFrameCount: number) : number;
|
|
1138
|
-
Invoke?: (providerId: number, interleavedSampleFrames: System.IntPtr, sampleFrameCount: number) => number;
|
|
1139
|
-
}
|
|
1140
|
-
var ConsumeSampleFramesNativeFunction: { new (func: (providerId: number, interleavedSampleFrames: System.IntPtr, sampleFrameCount: number) => number): ConsumeSampleFramesNativeFunction; }
|
|
1141
|
-
interface SampleFramesHandler
|
|
1142
|
-
{
|
|
1143
|
-
(provider: UnityEngine.Experimental.Audio.AudioSampleProvider, sampleFrameCount: number) : void;
|
|
1144
|
-
Invoke?: (provider: UnityEngine.Experimental.Audio.AudioSampleProvider, sampleFrameCount: number) => void;
|
|
1145
|
-
}
|
|
1146
|
-
var SampleFramesHandler: { new (func: (provider: UnityEngine.Experimental.Audio.AudioSampleProvider, sampleFrameCount: number) => void): SampleFramesHandler; }
|
|
1147
|
-
interface SampleFramesEventNativeFunction
|
|
1148
|
-
{
|
|
1149
|
-
(userData: System.IntPtr, providerId: number, sampleFrameCount: number) : void;
|
|
1150
|
-
Invoke?: (userData: System.IntPtr, providerId: number, sampleFrameCount: number) => void;
|
|
1151
|
-
}
|
|
1152
|
-
var SampleFramesEventNativeFunction: { new (func: (userData: System.IntPtr, providerId: number, sampleFrameCount: number) => void): SampleFramesEventNativeFunction; }
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1
|
+
|
|
2
|
+
declare namespace CS {
|
|
3
|
+
// const __keep_incompatibility: unique symbol;
|
|
4
|
+
//
|
|
5
|
+
// interface $Ref<T> {
|
|
6
|
+
// value: T
|
|
7
|
+
// }
|
|
8
|
+
// namespace System {
|
|
9
|
+
// interface Array$1<T> extends System.Array {
|
|
10
|
+
// get_Item(index: number):T;
|
|
11
|
+
//
|
|
12
|
+
// set_Item(index: number, value: T):void;
|
|
13
|
+
// }
|
|
14
|
+
// }
|
|
15
|
+
// interface $Task<T> {}
|
|
16
|
+
namespace UnityEngine {
|
|
17
|
+
/** Controls the global audio settings from script.
|
|
18
|
+
*/
|
|
19
|
+
class AudioSettings extends System.Object
|
|
20
|
+
{
|
|
21
|
+
protected [__keep_incompatibility]: never;
|
|
22
|
+
/** Returns the speaker mode capability of the current audio driver. (Read Only)
|
|
23
|
+
*/
|
|
24
|
+
public static get driverCapabilities(): UnityEngine.AudioSpeakerMode;
|
|
25
|
+
/** AudioSettings.speakerMode is deprecated. Use AudioSettings.GetConfiguration and AudioSettings.Reset to adjust audio settings instead.
|
|
26
|
+
*/
|
|
27
|
+
public static get speakerMode(): UnityEngine.AudioSpeakerMode;
|
|
28
|
+
public static set speakerMode(value: UnityEngine.AudioSpeakerMode);
|
|
29
|
+
/** Returns the current time of the audio system.
|
|
30
|
+
*/
|
|
31
|
+
public static get dspTime(): number;
|
|
32
|
+
/** Get the mixer's current output rate.
|
|
33
|
+
*/
|
|
34
|
+
public static get outputSampleRate(): number;
|
|
35
|
+
public static set outputSampleRate(value: number);
|
|
36
|
+
/** Get the mixer's buffer size in samples.
|
|
37
|
+
* @param $bufferLength Is the length of each buffer in the ringbuffer.
|
|
38
|
+
* @param $numBuffers Is number of buffers.
|
|
39
|
+
*/
|
|
40
|
+
public static GetDSPBufferSize ($bufferLength: $Ref<number>, $numBuffers: $Ref<number>) : void
|
|
41
|
+
/** Returns an array with the names of all the available spatializer plugins.
|
|
42
|
+
* @returns An array of spatializer names.
|
|
43
|
+
*/
|
|
44
|
+
public static GetSpatializerPluginNames () : System.Array$1<string>
|
|
45
|
+
/** Returns the name of the spatializer selected on the currently-running platform.
|
|
46
|
+
* @returns The spatializer plugin name.
|
|
47
|
+
*/
|
|
48
|
+
public static GetSpatializerPluginName () : string
|
|
49
|
+
/** Sets the spatializer plugin for all platform groups. If a null or empty string is passed in, the existing spatializer plugin will be cleared.
|
|
50
|
+
* @param $pluginName The spatializer plugin name.
|
|
51
|
+
*/
|
|
52
|
+
public static SetSpatializerPluginName ($pluginName: string) : void
|
|
53
|
+
/** Returns the current configuration of the audio device and system. The values in the struct may then be modified and reapplied via AudioSettings.Reset.
|
|
54
|
+
* @returns The new configuration to be applied.
|
|
55
|
+
*/
|
|
56
|
+
public static GetConfiguration () : UnityEngine.AudioConfiguration
|
|
57
|
+
/** Changes the device configuration and invokes the AudioSettings.OnAudioConfigurationChanged delegate with the argument deviceWasChanged=false. There's no guarantee that the exact settings specified are used, but Unity automatically uses the closest match that it supports. Note: This can cause main thread stalls if AudioSettings.Reset is called when objects are loading asynchronously.
|
|
58
|
+
* @param $config The new configuration to be used.
|
|
59
|
+
* @returns True if all settings could be successfully applied.
|
|
60
|
+
*/
|
|
61
|
+
public static Reset ($config: UnityEngine.AudioConfiguration) : boolean
|
|
62
|
+
public static add_OnAudioConfigurationChanged ($value: UnityEngine.AudioSettings.AudioConfigurationChangeHandler) : void
|
|
63
|
+
public static remove_OnAudioConfigurationChanged ($value: UnityEngine.AudioSettings.AudioConfigurationChangeHandler) : void
|
|
64
|
+
public constructor ()
|
|
65
|
+
}
|
|
66
|
+
/** These are speaker types defined for use with AudioSettings.speakerMode.
|
|
67
|
+
*/
|
|
68
|
+
enum AudioSpeakerMode
|
|
69
|
+
{ Raw = 0, Mono = 1, Stereo = 2, Quad = 3, Surround = 4, Mode5point1 = 5, Mode7point1 = 6, Prologic = 7 }
|
|
70
|
+
/** Specifies the current properties or desired properties to be set for the audio system.
|
|
71
|
+
*/
|
|
72
|
+
class AudioConfiguration extends System.ValueType
|
|
73
|
+
{
|
|
74
|
+
protected [__keep_incompatibility]: never;
|
|
75
|
+
/** The current speaker mode used by the audio output device.
|
|
76
|
+
*/
|
|
77
|
+
public speakerMode : UnityEngine.AudioSpeakerMode
|
|
78
|
+
/** The length of the DSP buffer in samples determining the latency of sounds by the audio output device.
|
|
79
|
+
*/
|
|
80
|
+
public dspBufferSize : number
|
|
81
|
+
/** The current sample rate of the audio output device used.
|
|
82
|
+
*/
|
|
83
|
+
public sampleRate : number
|
|
84
|
+
/** The current maximum number of simultaneously audible sounds in the game.
|
|
85
|
+
*/
|
|
86
|
+
public numRealVoices : number
|
|
87
|
+
/** The maximum number of managed sounds in the game. Beyond this limit sounds will simply stop playing.
|
|
88
|
+
*/
|
|
89
|
+
public numVirtualVoices : number
|
|
90
|
+
}
|
|
91
|
+
class AudioBehaviour extends UnityEngine.Behaviour
|
|
92
|
+
{
|
|
93
|
+
protected [__keep_incompatibility]: never;
|
|
94
|
+
public constructor ()
|
|
95
|
+
}
|
|
96
|
+
/** A representation of audio sources in 3D.
|
|
97
|
+
*/
|
|
98
|
+
class AudioSource extends UnityEngine.AudioBehaviour
|
|
99
|
+
{
|
|
100
|
+
protected [__keep_incompatibility]: never;
|
|
101
|
+
/** The volume of the audio source (0.0 to 1.0).
|
|
102
|
+
*/
|
|
103
|
+
public get volume(): number;
|
|
104
|
+
public set volume(value: number);
|
|
105
|
+
/** The pitch of the audio source.
|
|
106
|
+
*/
|
|
107
|
+
public get pitch(): number;
|
|
108
|
+
public set pitch(value: number);
|
|
109
|
+
/** Playback position in seconds.
|
|
110
|
+
*/
|
|
111
|
+
public get time(): number;
|
|
112
|
+
public set time(value: number);
|
|
113
|
+
/** Playback position in PCM samples.
|
|
114
|
+
*/
|
|
115
|
+
public get timeSamples(): number;
|
|
116
|
+
public set timeSamples(value: number);
|
|
117
|
+
/** The default AudioClip to play.
|
|
118
|
+
*/
|
|
119
|
+
public get clip(): UnityEngine.AudioClip;
|
|
120
|
+
public set clip(value: UnityEngine.AudioClip);
|
|
121
|
+
/** The default AudioResource to play.
|
|
122
|
+
*/
|
|
123
|
+
public get resource(): UnityEngine.Audio.AudioResource;
|
|
124
|
+
public set resource(value: UnityEngine.Audio.AudioResource);
|
|
125
|
+
/** The target group to which the AudioSource should route its signal.
|
|
126
|
+
*/
|
|
127
|
+
public get outputAudioMixerGroup(): UnityEngine.Audio.AudioMixerGroup;
|
|
128
|
+
public set outputAudioMixerGroup(value: UnityEngine.Audio.AudioMixerGroup);
|
|
129
|
+
/** Gets or sets the gamepad audio output type for this audio source.
|
|
130
|
+
*/
|
|
131
|
+
public get gamepadSpeakerOutputType(): UnityEngine.GamepadSpeakerOutputType;
|
|
132
|
+
public set gamepadSpeakerOutputType(value: UnityEngine.GamepadSpeakerOutputType);
|
|
133
|
+
/** Is the clip playing right now (Read Only)?
|
|
134
|
+
*/
|
|
135
|
+
public get isPlaying(): boolean;
|
|
136
|
+
/** True if all sounds played by the AudioSource (main sound started by Play() or playOnAwake as well as one-shots) are culled by the audio system.
|
|
137
|
+
*/
|
|
138
|
+
public get isVirtual(): boolean;
|
|
139
|
+
/** Is the audio clip looping?
|
|
140
|
+
*/
|
|
141
|
+
public get loop(): boolean;
|
|
142
|
+
public set loop(value: boolean);
|
|
143
|
+
/** This makes the audio source not take into account the volume of the audio listener.
|
|
144
|
+
*/
|
|
145
|
+
public get ignoreListenerVolume(): boolean;
|
|
146
|
+
public set ignoreListenerVolume(value: boolean);
|
|
147
|
+
/** If set to true, the audio source will automatically start playing on awake.
|
|
148
|
+
*/
|
|
149
|
+
public get playOnAwake(): boolean;
|
|
150
|
+
public set playOnAwake(value: boolean);
|
|
151
|
+
/** Allows AudioSource to play even though AudioListener.pause is set to true. This is useful for the menu element sounds or background music in pause menus.
|
|
152
|
+
*/
|
|
153
|
+
public get ignoreListenerPause(): boolean;
|
|
154
|
+
public set ignoreListenerPause(value: boolean);
|
|
155
|
+
/** Whether the Audio Source should be updated in the fixed or dynamic update.
|
|
156
|
+
*/
|
|
157
|
+
public get velocityUpdateMode(): UnityEngine.AudioVelocityUpdateMode;
|
|
158
|
+
public set velocityUpdateMode(value: UnityEngine.AudioVelocityUpdateMode);
|
|
159
|
+
/** Pans a playing sound in a stereo way (left or right). This only applies to sounds that are Mono or Stereo.
|
|
160
|
+
*/
|
|
161
|
+
public get panStereo(): number;
|
|
162
|
+
public set panStereo(value: number);
|
|
163
|
+
/** Sets how much this AudioSource is affected by 3D spatialisation calculations (attenuation, doppler etc). 0.0 makes the sound full 2D, 1.0 makes it full 3D.
|
|
164
|
+
*/
|
|
165
|
+
public get spatialBlend(): number;
|
|
166
|
+
public set spatialBlend(value: number);
|
|
167
|
+
/** Enables or disables spatialization.
|
|
168
|
+
*/
|
|
169
|
+
public get spatialize(): boolean;
|
|
170
|
+
public set spatialize(value: boolean);
|
|
171
|
+
/** Determines if the spatializer effect is inserted before or after the effect filters.
|
|
172
|
+
*/
|
|
173
|
+
public get spatializePostEffects(): boolean;
|
|
174
|
+
public set spatializePostEffects(value: boolean);
|
|
175
|
+
/** The amount by which the signal from the AudioSource will be mixed into the global reverb associated with the Reverb Zones.
|
|
176
|
+
*/
|
|
177
|
+
public get reverbZoneMix(): number;
|
|
178
|
+
public set reverbZoneMix(value: number);
|
|
179
|
+
/** Bypass effects (Applied from filter components or global listener filters).
|
|
180
|
+
*/
|
|
181
|
+
public get bypassEffects(): boolean;
|
|
182
|
+
public set bypassEffects(value: boolean);
|
|
183
|
+
/** When set global effects on the AudioListener will not be applied to the audio signal generated by the AudioSource. Does not apply if the AudioSource is playing into a mixer group.
|
|
184
|
+
*/
|
|
185
|
+
public get bypassListenerEffects(): boolean;
|
|
186
|
+
public set bypassListenerEffects(value: boolean);
|
|
187
|
+
/** When set doesn't route the signal from an AudioSource into the global reverb associated with reverb zones.
|
|
188
|
+
*/
|
|
189
|
+
public get bypassReverbZones(): boolean;
|
|
190
|
+
public set bypassReverbZones(value: boolean);
|
|
191
|
+
/** Sets the Doppler scale for this AudioSource.
|
|
192
|
+
*/
|
|
193
|
+
public get dopplerLevel(): number;
|
|
194
|
+
public set dopplerLevel(value: number);
|
|
195
|
+
/** Sets the spread angle (in degrees) of a 3d stereo or multichannel sound in speaker space.
|
|
196
|
+
*/
|
|
197
|
+
public get spread(): number;
|
|
198
|
+
public set spread(value: number);
|
|
199
|
+
/** Sets the priority of the AudioSource.
|
|
200
|
+
*/
|
|
201
|
+
public get priority(): number;
|
|
202
|
+
public set priority(value: number);
|
|
203
|
+
/** Un- / Mutes the AudioSource. Mute sets the volume=0, Un-Mute restore the original volume.
|
|
204
|
+
*/
|
|
205
|
+
public get mute(): boolean;
|
|
206
|
+
public set mute(value: boolean);
|
|
207
|
+
/** Within the Min distance the AudioSource will cease to grow louder in volume.
|
|
208
|
+
*/
|
|
209
|
+
public get minDistance(): number;
|
|
210
|
+
public set minDistance(value: number);
|
|
211
|
+
/** (Logarithmic rolloff) MaxDistance is the distance a sound stops attenuating at.
|
|
212
|
+
*/
|
|
213
|
+
public get maxDistance(): number;
|
|
214
|
+
public set maxDistance(value: number);
|
|
215
|
+
/** Sets/Gets how the AudioSource attenuates over distance.
|
|
216
|
+
*/
|
|
217
|
+
public get rolloffMode(): UnityEngine.AudioRolloffMode;
|
|
218
|
+
public set rolloffMode(value: UnityEngine.AudioRolloffMode);
|
|
219
|
+
/** Enable playing of audio source though a specfic gamepad.
|
|
220
|
+
* @param $slot Slot number of the gamepad (0-3).
|
|
221
|
+
* @returns Returns TRUE if enabling audio output through this users controller was successful.
|
|
222
|
+
*/
|
|
223
|
+
public PlayOnGamepad ($slot: number) : boolean
|
|
224
|
+
/** Disables audio output to a gamepad for this audio source.
|
|
225
|
+
* @returns Returns true if successful.
|
|
226
|
+
*/
|
|
227
|
+
public DisableGamepadOutput () : boolean
|
|
228
|
+
public SetGamepadSpeakerMixLevel ($slot: number, $mixLevel: number) : boolean
|
|
229
|
+
public SetGamepadSpeakerMixLevelDefault ($slot: number) : boolean
|
|
230
|
+
public SetGamepadSpeakerRestrictedAudio ($slot: number, $restricted: boolean) : boolean
|
|
231
|
+
/** Check if the platform supports an audio output type on gamepads.
|
|
232
|
+
* @param $outputType The desired output type.
|
|
233
|
+
* @returns Returns true if the gamepad supports the specified audio output type.
|
|
234
|
+
*/
|
|
235
|
+
public static GamepadSpeakerSupportsOutputType ($outputType: UnityEngine.GamepadSpeakerOutputType) : boolean
|
|
236
|
+
public Play () : void
|
|
237
|
+
/** Plays the clip.
|
|
238
|
+
* @param $delay Deprecated. Delay in number of samples, assuming a 44100Hz sample rate (meaning that Play(44100) will delay the playing by exactly 1 sec).
|
|
239
|
+
*/
|
|
240
|
+
public Play ($delay: bigint) : void
|
|
241
|
+
/** Plays the clip with a delay specified in seconds. Users are advised to use this function instead of the old Play(delay) function that took a delay specified in samples relative to a reference rate of 44.1 kHz as an argument.
|
|
242
|
+
* @param $delay Delay time specified in seconds.
|
|
243
|
+
*/
|
|
244
|
+
public PlayDelayed ($delay: number) : void
|
|
245
|
+
/** Plays the clip at a specific time on the absolute time-line that AudioSettings.dspTime reads from.
|
|
246
|
+
* @param $time Time in seconds on the absolute time-line that AudioSettings.dspTime refers to for when the sound should start playing.
|
|
247
|
+
*/
|
|
248
|
+
public PlayScheduled ($time: number) : void
|
|
249
|
+
/** Plays an AudioClip, and scales the AudioSource volume by volumeScale.
|
|
250
|
+
* @param $clip The clip being played.
|
|
251
|
+
* @param $volumeScale The scale of the volume (0-1).
|
|
252
|
+
*/
|
|
253
|
+
public PlayOneShot ($clip: UnityEngine.AudioClip) : void
|
|
254
|
+
/** Plays an AudioClip, and scales the AudioSource volume by volumeScale.
|
|
255
|
+
* @param $clip The clip being played.
|
|
256
|
+
* @param $volumeScale The scale of the volume (0-1).
|
|
257
|
+
*/
|
|
258
|
+
public PlayOneShot ($clip: UnityEngine.AudioClip, $volumeScale: number) : void
|
|
259
|
+
/** Changes the time at which a sound that has already been scheduled to play will start.
|
|
260
|
+
* @param $time Time in seconds.
|
|
261
|
+
*/
|
|
262
|
+
public SetScheduledStartTime ($time: number) : void
|
|
263
|
+
/** Changes the time at which a sound that has already been scheduled to play will end. Notice that depending on the timing not all rescheduling requests can be fulfilled.
|
|
264
|
+
* @param $time Time in seconds.
|
|
265
|
+
*/
|
|
266
|
+
public SetScheduledEndTime ($time: number) : void
|
|
267
|
+
/** Stops playing the clip.
|
|
268
|
+
*/
|
|
269
|
+
public Stop () : void
|
|
270
|
+
/** Pauses playing the clip.
|
|
271
|
+
*/
|
|
272
|
+
public Pause () : void
|
|
273
|
+
/** Unpause the paused playback of this AudioSource.
|
|
274
|
+
*/
|
|
275
|
+
public UnPause () : void
|
|
276
|
+
/** Plays an AudioClip at a given position in world space.
|
|
277
|
+
* @param $clip Audio data to play.
|
|
278
|
+
* @param $position Position in world space from which sound originates.
|
|
279
|
+
* @param $volume Playback volume.
|
|
280
|
+
*/
|
|
281
|
+
public static PlayClipAtPoint ($clip: UnityEngine.AudioClip, $position: UnityEngine.Vector3) : void
|
|
282
|
+
/** Plays an AudioClip at a given position in world space.
|
|
283
|
+
* @param $clip Audio data to play.
|
|
284
|
+
* @param $position Position in world space from which sound originates.
|
|
285
|
+
* @param $volume Playback volume.
|
|
286
|
+
*/
|
|
287
|
+
public static PlayClipAtPoint ($clip: UnityEngine.AudioClip, $position: UnityEngine.Vector3, $volume: number) : void
|
|
288
|
+
/** Set the custom curve for the given AudioSourceCurveType.
|
|
289
|
+
* @param $type The curve type that should be set.
|
|
290
|
+
* @param $curve The curve that should be applied to the given curve type.
|
|
291
|
+
*/
|
|
292
|
+
public SetCustomCurve ($type: UnityEngine.AudioSourceCurveType, $curve: UnityEngine.AnimationCurve) : void
|
|
293
|
+
/** Get the current custom curve for the given AudioSourceCurveType.
|
|
294
|
+
* @param $type The curve type to get.
|
|
295
|
+
* @returns The custom AnimationCurve corresponding to the given curve type.
|
|
296
|
+
*/
|
|
297
|
+
public GetCustomCurve ($type: UnityEngine.AudioSourceCurveType) : UnityEngine.AnimationCurve
|
|
298
|
+
/** Provides a block of the currently playing source's output data.
|
|
299
|
+
* @param $samples The array to populate with audio samples. Its length must be a power of 2.
|
|
300
|
+
* @param $channel The channel to sample from.
|
|
301
|
+
*/
|
|
302
|
+
public GetOutputData ($samples: System.Array$1<number>, $channel: number) : void
|
|
303
|
+
/** Provides a block of the currently playing audio source's spectrum data.
|
|
304
|
+
* @param $samples The array to populate with audio samples. Its length must be a power of 2.
|
|
305
|
+
* @param $channel The channel to sample from.
|
|
306
|
+
* @param $window The FFTWindow type to use when sampling.
|
|
307
|
+
*/
|
|
308
|
+
public GetSpectrumData ($samples: System.Array$1<number>, $channel: number, $window: UnityEngine.FFTWindow) : void
|
|
309
|
+
/** Sets a user-defined parameter of a custom spatializer effect that is attached to an AudioSource.
|
|
310
|
+
* @param $index Zero-based index of user-defined parameter to be set.
|
|
311
|
+
* @param $value New value of the user-defined parameter.
|
|
312
|
+
* @returns True, if the parameter could be set.
|
|
313
|
+
*/
|
|
314
|
+
public SetSpatializerFloat ($index: number, $value: number) : boolean
|
|
315
|
+
/** Reads a user-defined parameter of a custom spatializer effect that is attached to an AudioSource.
|
|
316
|
+
* @param $index Zero-based index of user-defined parameter to be read.
|
|
317
|
+
* @param $value Return value of the user-defined parameter that is read.
|
|
318
|
+
* @returns True, if the parameter could be read.
|
|
319
|
+
*/
|
|
320
|
+
public GetSpatializerFloat ($index: number, $value: $Ref<number>) : boolean
|
|
321
|
+
/** Reads a user-defined parameter of a custom ambisonic decoder effect that is attached to an AudioSource.
|
|
322
|
+
* @param $index Zero-based index of user-defined parameter to be read.
|
|
323
|
+
* @param $value Return value of the user-defined parameter that is read.
|
|
324
|
+
* @returns True, if the parameter could be read.
|
|
325
|
+
*/
|
|
326
|
+
public GetAmbisonicDecoderFloat ($index: number, $value: $Ref<number>) : boolean
|
|
327
|
+
/** Sets a user-defined parameter of a custom ambisonic decoder effect that is attached to an AudioSource.
|
|
328
|
+
* @param $index Zero-based index of user-defined parameter to be set.
|
|
329
|
+
* @param $value New value of the user-defined parameter.
|
|
330
|
+
* @returns True, if the parameter could be set.
|
|
331
|
+
*/
|
|
332
|
+
public SetAmbisonicDecoderFloat ($index: number, $value: number) : boolean
|
|
333
|
+
public constructor ()
|
|
334
|
+
}
|
|
335
|
+
/** A container for audio data.
|
|
336
|
+
*/
|
|
337
|
+
class AudioClip extends UnityEngine.Audio.AudioResource
|
|
338
|
+
{
|
|
339
|
+
protected [__keep_incompatibility]: never;
|
|
340
|
+
/** The length of the audio clip in seconds. (Read Only)
|
|
341
|
+
*/
|
|
342
|
+
public get length(): number;
|
|
343
|
+
/** The length of the audio clip in samples. (Read Only)
|
|
344
|
+
*/
|
|
345
|
+
public get samples(): number;
|
|
346
|
+
/** The number of channels in the audio clip. (Read Only)
|
|
347
|
+
*/
|
|
348
|
+
public get channels(): number;
|
|
349
|
+
/** The sample frequency of the clip in Hertz. (Read Only)
|
|
350
|
+
*/
|
|
351
|
+
public get frequency(): number;
|
|
352
|
+
/** The load type of the clip (read-only).
|
|
353
|
+
*/
|
|
354
|
+
public get loadType(): UnityEngine.AudioClipLoadType;
|
|
355
|
+
/** Preloads audio data of the clip when the clip asset is loaded. When this flag is off, scripts have to call AudioClip.LoadAudioData() to load the data before the clip can be played. Properties like length, channels and format are available before the audio data has been loaded.
|
|
356
|
+
*/
|
|
357
|
+
public get preloadAudioData(): boolean;
|
|
358
|
+
/** Returns true if this audio clip is ambisonic (read-only).
|
|
359
|
+
*/
|
|
360
|
+
public get ambisonic(): boolean;
|
|
361
|
+
/** Corresponding to the "Load In Background" flag in the inspector, when this flag is set, the loading will happen delayed without blocking the main thread.
|
|
362
|
+
*/
|
|
363
|
+
public get loadInBackground(): boolean;
|
|
364
|
+
/** Returns the current load state of the audio data associated with an AudioClip.
|
|
365
|
+
*/
|
|
366
|
+
public get loadState(): UnityEngine.AudioDataLoadState;
|
|
367
|
+
/** Loads the audio data of a clip. Clips that have "Preload Audio Data" set will load the audio data automatically.
|
|
368
|
+
* @returns Returns true if loading succeeded.
|
|
369
|
+
*/
|
|
370
|
+
public LoadAudioData () : boolean
|
|
371
|
+
/** Unloads the audio data associated with the clip. This works only for AudioClips that are based on actual sound file assets.
|
|
372
|
+
* @returns Returns false if unloading failed.
|
|
373
|
+
*/
|
|
374
|
+
public UnloadAudioData () : boolean
|
|
375
|
+
/** Fills an array with sample data from the clip.
|
|
376
|
+
*/
|
|
377
|
+
public GetData ($data: System.Array$1<number>, $offsetSamples: number) : boolean
|
|
378
|
+
/** Set sample data in a clip.
|
|
379
|
+
*/
|
|
380
|
+
public SetData ($data: System.Array$1<number>, $offsetSamples: number) : boolean
|
|
381
|
+
/** Creates a user AudioClip with a name and with the given length in samples, channels and frequency.
|
|
382
|
+
* @param $name Name of clip.
|
|
383
|
+
* @param $lengthSamples Number of sample frames.
|
|
384
|
+
* @param $channels Number of channels per frame.
|
|
385
|
+
* @param $frequency Sample frequency of clip.
|
|
386
|
+
* @param $_3D Audio clip is played back in 3D.
|
|
387
|
+
* @param $stream True if clip is streamed, that is if the pcmreadercallback generates data on the fly.
|
|
388
|
+
* @param $pcmreadercallback This callback is invoked to generate a block of sample data. Non-streamed clips call this only once at creation time while streamed clips call this continuously.
|
|
389
|
+
* @param $pcmsetpositioncallback This callback is invoked whenever the clip loops or changes playback position.
|
|
390
|
+
* @returns A reference to the created AudioClip.
|
|
391
|
+
*/
|
|
392
|
+
public static Create ($name: string, $lengthSamples: number, $channels: number, $frequency: number, $stream: boolean) : UnityEngine.AudioClip
|
|
393
|
+
public static Create ($name: string, $lengthSamples: number, $channels: number, $frequency: number, $stream: boolean, $pcmreadercallback: UnityEngine.AudioClip.PCMReaderCallback) : UnityEngine.AudioClip
|
|
394
|
+
public static Create ($name: string, $lengthSamples: number, $channels: number, $frequency: number, $stream: boolean, $pcmreadercallback: UnityEngine.AudioClip.PCMReaderCallback, $pcmsetpositioncallback: UnityEngine.AudioClip.PCMSetPositionCallback) : UnityEngine.AudioClip
|
|
395
|
+
}
|
|
396
|
+
/** Gamepad audio output types.
|
|
397
|
+
*/
|
|
398
|
+
enum GamepadSpeakerOutputType
|
|
399
|
+
{ Speaker = 0, Vibration = 1, SecondaryVibration = 2 }
|
|
400
|
+
/** Describes when an AudioSource or AudioListener is updated.
|
|
401
|
+
*/
|
|
402
|
+
enum AudioVelocityUpdateMode
|
|
403
|
+
{ Auto = 0, Fixed = 1, Dynamic = 2 }
|
|
404
|
+
/** This defines the curve type of the different custom curves that can be queried and set within the AudioSource.
|
|
405
|
+
*/
|
|
406
|
+
enum AudioSourceCurveType
|
|
407
|
+
{ CustomRolloff = 0, SpatialBlend = 1, ReverbZoneMix = 2, Spread = 3 }
|
|
408
|
+
/** Rolloff modes that a 3D sound can have in an audio source.
|
|
409
|
+
*/
|
|
410
|
+
enum AudioRolloffMode
|
|
411
|
+
{ Logarithmic = 0, Linear = 1, Custom = 2 }
|
|
412
|
+
/** Spectrum analysis windowing types.
|
|
413
|
+
*/
|
|
414
|
+
enum FFTWindow
|
|
415
|
+
{ Rectangular = 0, Triangle = 1, Hamming = 2, Hanning = 3, Blackman = 4, BlackmanHarris = 5 }
|
|
416
|
+
/** The Audio Low Pass Filter passes low frequencies of an AudioSource or all sounds reaching an AudioListener, while removing frequencies higher than the Cutoff Frequency.
|
|
417
|
+
*/
|
|
418
|
+
class AudioLowPassFilter extends UnityEngine.Behaviour
|
|
419
|
+
{
|
|
420
|
+
protected [__keep_incompatibility]: never;
|
|
421
|
+
/** Returns or sets the current custom frequency cutoff curve.
|
|
422
|
+
*/
|
|
423
|
+
public get customCutoffCurve(): UnityEngine.AnimationCurve;
|
|
424
|
+
public set customCutoffCurve(value: UnityEngine.AnimationCurve);
|
|
425
|
+
/** Lowpass cutoff frequency in hz. 10.0 to 22000.0. Default = 5000.0.
|
|
426
|
+
*/
|
|
427
|
+
public get cutoffFrequency(): number;
|
|
428
|
+
public set cutoffFrequency(value: number);
|
|
429
|
+
/** Determines how much the filter's self-resonance is dampened.
|
|
430
|
+
*/
|
|
431
|
+
public get lowpassResonanceQ(): number;
|
|
432
|
+
public set lowpassResonanceQ(value: number);
|
|
433
|
+
public constructor ()
|
|
434
|
+
}
|
|
435
|
+
/** The Audio High Pass Filter passes high frequencies of an AudioSource, and cuts off signals with frequencies lower than the Cutoff Frequency.
|
|
436
|
+
*/
|
|
437
|
+
class AudioHighPassFilter extends UnityEngine.Behaviour
|
|
438
|
+
{
|
|
439
|
+
protected [__keep_incompatibility]: never;
|
|
440
|
+
/** Highpass cutoff frequency in hz. 10.0 to 22000.0. Default = 5000.0.
|
|
441
|
+
*/
|
|
442
|
+
public get cutoffFrequency(): number;
|
|
443
|
+
public set cutoffFrequency(value: number);
|
|
444
|
+
/** Determines how much the filter's self-resonance isdampened.
|
|
445
|
+
*/
|
|
446
|
+
public get highpassResonanceQ(): number;
|
|
447
|
+
public set highpassResonanceQ(value: number);
|
|
448
|
+
public constructor ()
|
|
449
|
+
}
|
|
450
|
+
/** The Audio Reverb Filter takes an Audio Clip and distorts it to create a custom reverb effect.
|
|
451
|
+
*/
|
|
452
|
+
class AudioReverbFilter extends UnityEngine.Behaviour
|
|
453
|
+
{
|
|
454
|
+
protected [__keep_incompatibility]: never;
|
|
455
|
+
/** Set/Get reverb preset properties.
|
|
456
|
+
*/
|
|
457
|
+
public get reverbPreset(): UnityEngine.AudioReverbPreset;
|
|
458
|
+
public set reverbPreset(value: UnityEngine.AudioReverbPreset);
|
|
459
|
+
/** Mix level of dry signal in output in millibels (mB). Ranges from -10000.0 to 0.0. Default is 0.
|
|
460
|
+
*/
|
|
461
|
+
public get dryLevel(): number;
|
|
462
|
+
public set dryLevel(value: number);
|
|
463
|
+
/** Room effect level at low frequencies in millibels (mB). Ranges from -10000.0 to 0.0. Default is 0.0.
|
|
464
|
+
*/
|
|
465
|
+
public get room(): number;
|
|
466
|
+
public set room(value: number);
|
|
467
|
+
/** Room effect high-frequency level re. low frequency level in millibels (mB). Ranges from -10000.0 to 0.0. Default is 0.0.
|
|
468
|
+
*/
|
|
469
|
+
public get roomHF(): number;
|
|
470
|
+
public set roomHF(value: number);
|
|
471
|
+
/** Reverberation decay time at low-frequencies in seconds. Ranges from 0.1 to 20.0. Default is 1.0.
|
|
472
|
+
*/
|
|
473
|
+
public get decayTime(): number;
|
|
474
|
+
public set decayTime(value: number);
|
|
475
|
+
/** Decay HF Ratio : High-frequency to low-frequency decay time ratio. Ranges from 0.1 to 2.0. Default is 0.5.
|
|
476
|
+
*/
|
|
477
|
+
public get decayHFRatio(): number;
|
|
478
|
+
public set decayHFRatio(value: number);
|
|
479
|
+
/** Early reflections level relative to room effect in millibels (mB). Ranges from -10000.0 to 1000.0. Default is -10000.0.
|
|
480
|
+
*/
|
|
481
|
+
public get reflectionsLevel(): number;
|
|
482
|
+
public set reflectionsLevel(value: number);
|
|
483
|
+
/** Late reverberation level relative to room effect in millibels (mB). Ranges from -10000.0 to 2000.0. Default is 0.0.
|
|
484
|
+
*/
|
|
485
|
+
public get reflectionsDelay(): number;
|
|
486
|
+
public set reflectionsDelay(value: number);
|
|
487
|
+
/** Late reverberation level relative to room effect in millibels (mB). Ranges from -10000.0 to 2000.0. Default is 0.0.
|
|
488
|
+
*/
|
|
489
|
+
public get reverbLevel(): number;
|
|
490
|
+
public set reverbLevel(value: number);
|
|
491
|
+
/** Late reverberation delay time relative to first reflection in seconds. Ranges from 0.0 to 0.1. Default is 0.04.
|
|
492
|
+
*/
|
|
493
|
+
public get reverbDelay(): number;
|
|
494
|
+
public set reverbDelay(value: number);
|
|
495
|
+
/** Reverberation diffusion (echo density) in percent. Ranges from 0.0 to 100.0. Default is 100.0.
|
|
496
|
+
*/
|
|
497
|
+
public get diffusion(): number;
|
|
498
|
+
public set diffusion(value: number);
|
|
499
|
+
/** Reverberation density (modal density) in percent. Ranges from 0.0 to 100.0. Default is 100.0.
|
|
500
|
+
*/
|
|
501
|
+
public get density(): number;
|
|
502
|
+
public set density(value: number);
|
|
503
|
+
/** Reference high frequency in hertz (Hz). Ranges from 1000.0 to 20000.0. Default is 5000.0.
|
|
504
|
+
*/
|
|
505
|
+
public get hfReference(): number;
|
|
506
|
+
public set hfReference(value: number);
|
|
507
|
+
/** Room effect low-frequency level in millibels (mB). Ranges from -10000.0 to 0.0. Default is 0.0.
|
|
508
|
+
*/
|
|
509
|
+
public get roomLF(): number;
|
|
510
|
+
public set roomLF(value: number);
|
|
511
|
+
/** Reference low-frequency in hertz (Hz). Ranges from 20.0 to 1000.0. Default is 250.0.
|
|
512
|
+
*/
|
|
513
|
+
public get lfReference(): number;
|
|
514
|
+
public set lfReference(value: number);
|
|
515
|
+
public constructor ()
|
|
516
|
+
}
|
|
517
|
+
/** Reverb presets used by the Reverb Zone class and the audio reverb filter.
|
|
518
|
+
*/
|
|
519
|
+
enum AudioReverbPreset
|
|
520
|
+
{ Off = 0, Generic = 1, PaddedCell = 2, Room = 3, Bathroom = 4, Livingroom = 5, Stoneroom = 6, Auditorium = 7, Concerthall = 8, Cave = 9, Arena = 10, Hangar = 11, CarpetedHallway = 12, Hallway = 13, StoneCorridor = 14, Alley = 15, Forest = 16, City = 17, Mountains = 18, Quarry = 19, Plain = 20, ParkingLot = 21, SewerPipe = 22, Underwater = 23, Drugged = 24, Dizzy = 25, Psychotic = 26, User = 27 }
|
|
521
|
+
/** Value describing the current load state of the audio data associated with an AudioClip.
|
|
522
|
+
*/
|
|
523
|
+
enum AudioDataLoadState
|
|
524
|
+
{ Unloaded = 0, Loading = 1, Loaded = 2, Failed = 3 }
|
|
525
|
+
/** An enum containing different compression types.
|
|
526
|
+
*/
|
|
527
|
+
enum AudioCompressionFormat
|
|
528
|
+
{ PCM = 0, Vorbis = 1, ADPCM = 2, MP3 = 3, VAG = 4, HEVAG = 5, XMA = 6, AAC = 7, GCADPCM = 8, ATRAC9 = 9 }
|
|
529
|
+
/** Determines how the audio clip is loaded in.
|
|
530
|
+
*/
|
|
531
|
+
enum AudioClipLoadType
|
|
532
|
+
{ DecompressOnLoad = 0, CompressedInMemory = 1, Streaming = 2 }
|
|
533
|
+
/** Representation of a listener in 3D space.
|
|
534
|
+
*/
|
|
535
|
+
class AudioListener extends UnityEngine.AudioBehaviour
|
|
536
|
+
{
|
|
537
|
+
protected [__keep_incompatibility]: never;
|
|
538
|
+
/** Controls the game sound volume (0.0 to 1.0).
|
|
539
|
+
*/
|
|
540
|
+
public static get volume(): number;
|
|
541
|
+
public static set volume(value: number);
|
|
542
|
+
/** The paused state of the audio system.
|
|
543
|
+
*/
|
|
544
|
+
public static get pause(): boolean;
|
|
545
|
+
public static set pause(value: boolean);
|
|
546
|
+
/** This lets you set whether the Audio Listener should be updated in the fixed or dynamic update.
|
|
547
|
+
*/
|
|
548
|
+
public get velocityUpdateMode(): UnityEngine.AudioVelocityUpdateMode;
|
|
549
|
+
public set velocityUpdateMode(value: UnityEngine.AudioVelocityUpdateMode);
|
|
550
|
+
/** Provides a block of the listener (master)'s output data.
|
|
551
|
+
* @param $samples The array to populate with audio samples. Its length must be a power of 2.
|
|
552
|
+
* @param $channel The channel to sample from.
|
|
553
|
+
*/
|
|
554
|
+
public static GetOutputData ($samples: System.Array$1<number>, $channel: number) : void
|
|
555
|
+
/** Provides a block of the listener (master)'s spectrum data.
|
|
556
|
+
* @param $samples The array to populate with audio samples. Its length must be a power of 2.
|
|
557
|
+
* @param $channel The channel to sample from.
|
|
558
|
+
* @param $window The FFTWindow type to use when sampling.
|
|
559
|
+
*/
|
|
560
|
+
public static GetSpectrumData ($samples: System.Array$1<number>, $channel: number, $window: UnityEngine.FFTWindow) : void
|
|
561
|
+
public constructor ()
|
|
562
|
+
}
|
|
563
|
+
/** Reverb Zones are used when you want to create location based ambient effects in the Scene.
|
|
564
|
+
*/
|
|
565
|
+
class AudioReverbZone extends UnityEngine.Behaviour
|
|
566
|
+
{
|
|
567
|
+
protected [__keep_incompatibility]: never;
|
|
568
|
+
/** The distance from the centerpoint that the reverb will have full effect at. Default = 10.0.
|
|
569
|
+
*/
|
|
570
|
+
public get minDistance(): number;
|
|
571
|
+
public set minDistance(value: number);
|
|
572
|
+
/** The distance from the centerpoint that the reverb will not have any effect. Default = 15.0.
|
|
573
|
+
*/
|
|
574
|
+
public get maxDistance(): number;
|
|
575
|
+
public set maxDistance(value: number);
|
|
576
|
+
/** Set/Get reverb preset properties.
|
|
577
|
+
*/
|
|
578
|
+
public get reverbPreset(): UnityEngine.AudioReverbPreset;
|
|
579
|
+
public set reverbPreset(value: UnityEngine.AudioReverbPreset);
|
|
580
|
+
/** Room effect level (at mid frequencies).
|
|
581
|
+
*/
|
|
582
|
+
public get room(): number;
|
|
583
|
+
public set room(value: number);
|
|
584
|
+
/** Relative room effect level at high frequencies.
|
|
585
|
+
*/
|
|
586
|
+
public get roomHF(): number;
|
|
587
|
+
public set roomHF(value: number);
|
|
588
|
+
/** Relative room effect level at low frequencies.
|
|
589
|
+
*/
|
|
590
|
+
public get roomLF(): number;
|
|
591
|
+
public set roomLF(value: number);
|
|
592
|
+
/** Reverberation decay time at mid frequencies.
|
|
593
|
+
*/
|
|
594
|
+
public get decayTime(): number;
|
|
595
|
+
public set decayTime(value: number);
|
|
596
|
+
/** High-frequency to mid-frequency decay time ratio.
|
|
597
|
+
*/
|
|
598
|
+
public get decayHFRatio(): number;
|
|
599
|
+
public set decayHFRatio(value: number);
|
|
600
|
+
/** Early reflections level relative to room effect.
|
|
601
|
+
*/
|
|
602
|
+
public get reflections(): number;
|
|
603
|
+
public set reflections(value: number);
|
|
604
|
+
/** Initial reflection delay time.
|
|
605
|
+
*/
|
|
606
|
+
public get reflectionsDelay(): number;
|
|
607
|
+
public set reflectionsDelay(value: number);
|
|
608
|
+
/** Late reverberation level relative to room effect.
|
|
609
|
+
*/
|
|
610
|
+
public get reverb(): number;
|
|
611
|
+
public set reverb(value: number);
|
|
612
|
+
/** Late reverberation delay time relative to initial reflection.
|
|
613
|
+
*/
|
|
614
|
+
public get reverbDelay(): number;
|
|
615
|
+
public set reverbDelay(value: number);
|
|
616
|
+
/** Reference high frequency (hz).
|
|
617
|
+
*/
|
|
618
|
+
public get HFReference(): number;
|
|
619
|
+
public set HFReference(value: number);
|
|
620
|
+
/** Reference low frequency (hz).
|
|
621
|
+
*/
|
|
622
|
+
public get LFReference(): number;
|
|
623
|
+
public set LFReference(value: number);
|
|
624
|
+
/** Value that controls the echo density in the late reverberation decay.
|
|
625
|
+
*/
|
|
626
|
+
public get diffusion(): number;
|
|
627
|
+
public set diffusion(value: number);
|
|
628
|
+
/** Value that controls the modal density in the late reverberation decay.
|
|
629
|
+
*/
|
|
630
|
+
public get density(): number;
|
|
631
|
+
public set density(value: number);
|
|
632
|
+
public constructor ()
|
|
633
|
+
}
|
|
634
|
+
/** The Audio Distortion Filter distorts the sound from an AudioSource or sounds reaching the AudioListener.
|
|
635
|
+
*/
|
|
636
|
+
class AudioDistortionFilter extends UnityEngine.Behaviour
|
|
637
|
+
{
|
|
638
|
+
protected [__keep_incompatibility]: never;
|
|
639
|
+
/** Distortion value. 0.0 to 1.0. Default = 0.5.
|
|
640
|
+
*/
|
|
641
|
+
public get distortionLevel(): number;
|
|
642
|
+
public set distortionLevel(value: number);
|
|
643
|
+
public constructor ()
|
|
644
|
+
}
|
|
645
|
+
/** The Audio Echo Filter repeats a sound after a given Delay, attenuating the repetitions based on the Decay Ratio.
|
|
646
|
+
*/
|
|
647
|
+
class AudioEchoFilter extends UnityEngine.Behaviour
|
|
648
|
+
{
|
|
649
|
+
protected [__keep_incompatibility]: never;
|
|
650
|
+
/** Echo delay in ms. 10 to 5000. Default = 500.
|
|
651
|
+
*/
|
|
652
|
+
public get delay(): number;
|
|
653
|
+
public set delay(value: number);
|
|
654
|
+
/** Echo decay per delay. 0 to 1. 1.0 = No decay, 0.0 = total decay (i.e. simple 1 line delay). Default = 0.5.
|
|
655
|
+
*/
|
|
656
|
+
public get decayRatio(): number;
|
|
657
|
+
public set decayRatio(value: number);
|
|
658
|
+
/** Volume of original signal to pass to output. 0.0 to 1.0. Default = 1.0.
|
|
659
|
+
*/
|
|
660
|
+
public get dryMix(): number;
|
|
661
|
+
public set dryMix(value: number);
|
|
662
|
+
/** Volume of echo signal to pass to output. 0.0 to 1.0. Default = 1.0.
|
|
663
|
+
*/
|
|
664
|
+
public get wetMix(): number;
|
|
665
|
+
public set wetMix(value: number);
|
|
666
|
+
public constructor ()
|
|
667
|
+
}
|
|
668
|
+
/** The Audio Chorus Filter takes an Audio Clip and processes it creating a chorus effect.
|
|
669
|
+
*/
|
|
670
|
+
class AudioChorusFilter extends UnityEngine.Behaviour
|
|
671
|
+
{
|
|
672
|
+
protected [__keep_incompatibility]: never;
|
|
673
|
+
/** Volume of original signal to pass to output. 0.0 to 1.0. Default = 0.5.
|
|
674
|
+
*/
|
|
675
|
+
public get dryMix(): number;
|
|
676
|
+
public set dryMix(value: number);
|
|
677
|
+
/** Volume of 1st chorus tap. 0.0 to 1.0. Default = 0.5.
|
|
678
|
+
*/
|
|
679
|
+
public get wetMix1(): number;
|
|
680
|
+
public set wetMix1(value: number);
|
|
681
|
+
/** Volume of 2nd chorus tap. This tap is 90 degrees out of phase of the first tap. 0.0 to 1.0. Default = 0.5.
|
|
682
|
+
*/
|
|
683
|
+
public get wetMix2(): number;
|
|
684
|
+
public set wetMix2(value: number);
|
|
685
|
+
/** Volume of 3rd chorus tap. This tap is 90 degrees out of phase of the second tap. 0.0 to 1.0. Default = 0.5.
|
|
686
|
+
*/
|
|
687
|
+
public get wetMix3(): number;
|
|
688
|
+
public set wetMix3(value: number);
|
|
689
|
+
/** Chorus delay in ms. 0.1 to 100.0. Default = 40.0 ms.
|
|
690
|
+
*/
|
|
691
|
+
public get delay(): number;
|
|
692
|
+
public set delay(value: number);
|
|
693
|
+
/** Chorus modulation rate in hz. 0.0 to 20.0. Default = 0.8 hz.
|
|
694
|
+
*/
|
|
695
|
+
public get rate(): number;
|
|
696
|
+
public set rate(value: number);
|
|
697
|
+
/** Chorus modulation depth. 0.0 to 1.0. Default = 0.03.
|
|
698
|
+
*/
|
|
699
|
+
public get depth(): number;
|
|
700
|
+
public set depth(value: number);
|
|
701
|
+
public constructor ()
|
|
702
|
+
}
|
|
703
|
+
/** Use this class to record to an AudioClip using a connected microphone.
|
|
704
|
+
*/
|
|
705
|
+
class Microphone extends System.Object
|
|
706
|
+
{
|
|
707
|
+
protected [__keep_incompatibility]: never;
|
|
708
|
+
/** A list of available microphone devices, identified by name.
|
|
709
|
+
*/
|
|
710
|
+
public static get devices(): System.Array$1<string>;
|
|
711
|
+
/** Start Recording with device.
|
|
712
|
+
* @param $deviceName The name of the device.
|
|
713
|
+
* @param $loop Indicates whether the recording should continue recording if lengthSec is reached, and wrap around and record from the beginning of the AudioClip.
|
|
714
|
+
* @param $lengthSec Is the length of the AudioClip produced by the recording.
|
|
715
|
+
* @param $frequency The sample rate of the AudioClip produced by the recording.
|
|
716
|
+
* @returns The function returns null if the recording fails to start.
|
|
717
|
+
*/
|
|
718
|
+
public static Start ($deviceName: string, $loop: boolean, $lengthSec: number, $frequency: number) : UnityEngine.AudioClip
|
|
719
|
+
/** Stops recording.
|
|
720
|
+
* @param $deviceName The name of the device.
|
|
721
|
+
*/
|
|
722
|
+
public static End ($deviceName: string) : void
|
|
723
|
+
/** Query if a device is currently recording.
|
|
724
|
+
* @param $deviceName The name of the device.
|
|
725
|
+
*/
|
|
726
|
+
public static IsRecording ($deviceName: string) : boolean
|
|
727
|
+
/** Get the position in samples of the recording.
|
|
728
|
+
* @param $deviceName The name of the device.
|
|
729
|
+
*/
|
|
730
|
+
public static GetPosition ($deviceName: string) : number
|
|
731
|
+
/** Get the frequency capabilities of a device.
|
|
732
|
+
* @param $deviceName The name of the device.
|
|
733
|
+
* @param $minFreq Returns the minimum sampling frequency of the device.
|
|
734
|
+
* @param $maxFreq Returns the maximum sampling frequency of the device.
|
|
735
|
+
*/
|
|
736
|
+
public static GetDeviceCaps ($deviceName: string, $minFreq: $Ref<number>, $maxFreq: $Ref<number>) : void
|
|
737
|
+
public constructor ()
|
|
738
|
+
}
|
|
739
|
+
/** Allow recording the main output of the game or specific groups in the AudioMixer.
|
|
740
|
+
*/
|
|
741
|
+
class AudioRenderer extends System.Object
|
|
742
|
+
{
|
|
743
|
+
protected [__keep_incompatibility]: never;
|
|
744
|
+
/** Enters audio recording mode. After this Unity will output silence until AudioRenderer.Stop is called.
|
|
745
|
+
* @returns True if the engine was switched into output recording mode. False if it is already recording.
|
|
746
|
+
*/
|
|
747
|
+
public static Start () : boolean
|
|
748
|
+
/** Exits audio recording mode. After this audio output will be audible again.
|
|
749
|
+
* @returns True if the engine was recording when this function was called.
|
|
750
|
+
*/
|
|
751
|
+
public static Stop () : boolean
|
|
752
|
+
/** Returns the number of samples available since the last time AudioRenderer.Render was called. This is dependent on the frame capture rate.
|
|
753
|
+
* @returns Number of samples available since last recorded frame.
|
|
754
|
+
*/
|
|
755
|
+
public static GetSampleCountForCaptureFrame () : number
|
|
756
|
+
public static Render ($buffer: Unity.Collections.NativeArray$1<number>) : boolean
|
|
757
|
+
public constructor ()
|
|
758
|
+
}
|
|
759
|
+
/** MovieTexture has been removed. Use VideoPlayer instead.
|
|
760
|
+
*/
|
|
761
|
+
class MovieTexture extends UnityEngine.Texture
|
|
762
|
+
{
|
|
763
|
+
protected [__keep_incompatibility]: never;
|
|
764
|
+
}
|
|
765
|
+
enum WebCamFlags
|
|
766
|
+
{ FrontFacing = 1, AutoFocusPointSupported = 2 }
|
|
767
|
+
/** Enum representing the different types of web camera device.
|
|
768
|
+
*/
|
|
769
|
+
enum WebCamKind
|
|
770
|
+
{ WideAngle = 1, Telephoto = 2, ColorAndDepth = 3, UltraWideAngle = 4 }
|
|
771
|
+
/** A structure describing the webcam device.
|
|
772
|
+
*/
|
|
773
|
+
class WebCamDevice extends System.ValueType
|
|
774
|
+
{
|
|
775
|
+
protected [__keep_incompatibility]: never;
|
|
776
|
+
/** A human-readable name of the device. Varies across different systems.
|
|
777
|
+
*/
|
|
778
|
+
public get name(): string;
|
|
779
|
+
/** True if camera faces the same direction a screen does, false otherwise.
|
|
780
|
+
*/
|
|
781
|
+
public get isFrontFacing(): boolean;
|
|
782
|
+
/** Property of type WebCamKind denoting the kind of webcam device.
|
|
783
|
+
*/
|
|
784
|
+
public get kind(): UnityEngine.WebCamKind;
|
|
785
|
+
/** A string identifier used to create a depth data based WebCamTexture.
|
|
786
|
+
*/
|
|
787
|
+
public get depthCameraName(): string;
|
|
788
|
+
/** Returns true if the camera supports automatic focusing on points of interest and false otherwise.
|
|
789
|
+
*/
|
|
790
|
+
public get isAutoFocusPointSupported(): boolean;
|
|
791
|
+
/** Possible WebCamTexture resolutions for this device.
|
|
792
|
+
*/
|
|
793
|
+
public get availableResolutions(): System.Array$1<UnityEngine.Resolution>;
|
|
794
|
+
}
|
|
795
|
+
/** WebCam Textures are textures onto which the live video input is rendered.
|
|
796
|
+
*/
|
|
797
|
+
class WebCamTexture extends UnityEngine.Texture
|
|
798
|
+
{
|
|
799
|
+
protected [__keep_incompatibility]: never;
|
|
800
|
+
/** Return a list of available devices.
|
|
801
|
+
*/
|
|
802
|
+
public static get devices(): System.Array$1<UnityEngine.WebCamDevice>;
|
|
803
|
+
/** Returns if the camera is currently playing.
|
|
804
|
+
*/
|
|
805
|
+
public get isPlaying(): boolean;
|
|
806
|
+
/** Set this to specify the name of the device to use.
|
|
807
|
+
*/
|
|
808
|
+
public get deviceName(): string;
|
|
809
|
+
public set deviceName(value: string);
|
|
810
|
+
/** Set the requested frame rate of the camera device (in frames per second).
|
|
811
|
+
*/
|
|
812
|
+
public get requestedFPS(): number;
|
|
813
|
+
public set requestedFPS(value: number);
|
|
814
|
+
/** Set the requested width of the camera device.
|
|
815
|
+
*/
|
|
816
|
+
public get requestedWidth(): number;
|
|
817
|
+
public set requestedWidth(value: number);
|
|
818
|
+
/** Set the requested height of the camera device.
|
|
819
|
+
*/
|
|
820
|
+
public get requestedHeight(): number;
|
|
821
|
+
public set requestedHeight(value: number);
|
|
822
|
+
/** Returns an clockwise angle (in degrees), which can be used to rotate a polygon so camera contents are shown in correct orientation.
|
|
823
|
+
*/
|
|
824
|
+
public get videoRotationAngle(): number;
|
|
825
|
+
/** Returns if the texture image is vertically flipped.
|
|
826
|
+
*/
|
|
827
|
+
public get videoVerticallyMirrored(): boolean;
|
|
828
|
+
/** Did the video buffer update this frame?
|
|
829
|
+
*/
|
|
830
|
+
public get didUpdateThisFrame(): boolean;
|
|
831
|
+
/** This property allows you to set/get the auto focus point of the camera. This works only on Android and iOS devices.
|
|
832
|
+
*/
|
|
833
|
+
public get autoFocusPoint(): UnityEngine.Vector2 | null;
|
|
834
|
+
public set autoFocusPoint(value: UnityEngine.Vector2 | null);
|
|
835
|
+
/** This property is true if the texture is based on depth data.
|
|
836
|
+
*/
|
|
837
|
+
public get isDepth(): boolean;
|
|
838
|
+
/** Starts the camera.
|
|
839
|
+
*/
|
|
840
|
+
public Play () : void
|
|
841
|
+
/** Pauses the camera.
|
|
842
|
+
*/
|
|
843
|
+
public Pause () : void
|
|
844
|
+
/** Stops the camera.
|
|
845
|
+
*/
|
|
846
|
+
public Stop () : void
|
|
847
|
+
/** Gets the pixel color at coordinates (x, y).
|
|
848
|
+
* @param $x The x coordinate of the pixel to get. The range is 0 through the (texture width - 1).
|
|
849
|
+
* @param $y The y coordinate of the pixel to get. The range is 0 through the (texture height - 1).
|
|
850
|
+
* @returns The pixel color.
|
|
851
|
+
*/
|
|
852
|
+
public GetPixel ($x: number, $y: number) : UnityEngine.Color
|
|
853
|
+
/** Gets the pixel color data for a mipmap level as Color structs.
|
|
854
|
+
* @returns An array that contains the pixel colors.
|
|
855
|
+
*/
|
|
856
|
+
public GetPixels () : System.Array$1<UnityEngine.Color>
|
|
857
|
+
/** Gets the pixel color data for part of the texture as Color structs.
|
|
858
|
+
* @param $x The starting x position of the section to fetch.
|
|
859
|
+
* @param $y The starting y position of the section to fetch.
|
|
860
|
+
* @param $blockWidth The width of the section to fetch.
|
|
861
|
+
* @param $blockHeight The height of the section to fetch.
|
|
862
|
+
* @returns An array that contains the pixel colors.
|
|
863
|
+
*/
|
|
864
|
+
public GetPixels ($x: number, $y: number, $blockWidth: number, $blockHeight: number) : System.Array$1<UnityEngine.Color>
|
|
865
|
+
public GetPixels32 () : System.Array$1<UnityEngine.Color32>
|
|
866
|
+
/** Gets the pixel color data for a mipmap level as Color32 structs.
|
|
867
|
+
* @param $colors An optional array to write the pixel data to.
|
|
868
|
+
* @returns An array that contains the pixel colors.
|
|
869
|
+
*/
|
|
870
|
+
public GetPixels32 ($colors: System.Array$1<UnityEngine.Color32>) : System.Array$1<UnityEngine.Color32>
|
|
871
|
+
public constructor ($deviceName: string, $requestedWidth: number, $requestedHeight: number, $requestedFPS: number)
|
|
872
|
+
public constructor ($deviceName: string, $requestedWidth: number, $requestedHeight: number)
|
|
873
|
+
public constructor ($deviceName: string)
|
|
874
|
+
public constructor ($requestedWidth: number, $requestedHeight: number, $requestedFPS: number)
|
|
875
|
+
public constructor ($requestedWidth: number, $requestedHeight: number)
|
|
876
|
+
public constructor ()
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
namespace UnityEngine.AudioSettings {
|
|
880
|
+
interface AudioConfigurationChangeHandler
|
|
881
|
+
{
|
|
882
|
+
(deviceWasChanged: boolean) : void;
|
|
883
|
+
Invoke?: (deviceWasChanged: boolean) => void;
|
|
884
|
+
}
|
|
885
|
+
var AudioConfigurationChangeHandler: { new (func: (deviceWasChanged: boolean) => void): AudioConfigurationChangeHandler; }
|
|
886
|
+
class Mobile extends System.Object
|
|
887
|
+
{
|
|
888
|
+
protected [__keep_incompatibility]: never;
|
|
889
|
+
public static get muteState(): boolean;
|
|
890
|
+
public static get stopAudioOutputOnMute(): boolean;
|
|
891
|
+
public static set stopAudioOutputOnMute(value: boolean);
|
|
892
|
+
public static get audioOutputStarted(): boolean;
|
|
893
|
+
public static add_OnMuteStateChanged ($value: System.Action$1<boolean>) : void
|
|
894
|
+
public static remove_OnMuteStateChanged ($value: System.Action$1<boolean>) : void
|
|
895
|
+
public static StartAudioOutput () : void
|
|
896
|
+
public static StopAudioOutput () : void
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
namespace UnityEngine.Audio {
|
|
900
|
+
/** Represents an audio resource asset that you can play through an AudioSource.
|
|
901
|
+
*/
|
|
902
|
+
class AudioResource extends UnityEngine.Object
|
|
903
|
+
{
|
|
904
|
+
protected [__keep_incompatibility]: never;
|
|
905
|
+
}
|
|
906
|
+
/** Object representing a group in the mixer.
|
|
907
|
+
*/
|
|
908
|
+
class AudioMixerGroup extends UnityEngine.Object
|
|
909
|
+
{
|
|
910
|
+
protected [__keep_incompatibility]: never;
|
|
911
|
+
public get audioMixer(): UnityEngine.Audio.AudioMixer;
|
|
912
|
+
}
|
|
913
|
+
/** An implementation of IPlayable that controls an AudioClip.
|
|
914
|
+
*/
|
|
915
|
+
class AudioClipPlayable extends System.ValueType implements UnityEngine.Playables.IPlayable, System.IEquatable$1<UnityEngine.Audio.AudioClipPlayable>
|
|
916
|
+
{
|
|
917
|
+
protected [__keep_incompatibility]: never;
|
|
918
|
+
/** Creates an AudioClipPlayable in the PlayableGraph.
|
|
919
|
+
* @param $graph The PlayableGraph that will contain the new AnimationLayerMixerPlayable.
|
|
920
|
+
* @param $clip The AudioClip that will be added in the PlayableGraph.
|
|
921
|
+
* @param $looping True if the clip should loop, false otherwise.
|
|
922
|
+
* @returns A AudioClipPlayable linked to the PlayableGraph.
|
|
923
|
+
*/
|
|
924
|
+
public static Create ($graph: UnityEngine.Playables.PlayableGraph, $clip: UnityEngine.AudioClip, $looping: boolean) : UnityEngine.Audio.AudioClipPlayable
|
|
925
|
+
public GetHandle () : UnityEngine.Playables.PlayableHandle
|
|
926
|
+
public static op_Implicit ($playable: UnityEngine.Audio.AudioClipPlayable) : UnityEngine.Playables.Playable
|
|
927
|
+
public static op_Explicit ($playable: UnityEngine.Playables.Playable) : UnityEngine.Audio.AudioClipPlayable
|
|
928
|
+
public Equals ($other: UnityEngine.Audio.AudioClipPlayable) : boolean
|
|
929
|
+
public GetClip () : UnityEngine.AudioClip
|
|
930
|
+
public SetClip ($value: UnityEngine.AudioClip) : void
|
|
931
|
+
public GetLooped () : boolean
|
|
932
|
+
public SetLooped ($value: boolean) : void
|
|
933
|
+
public IsChannelPlaying () : boolean
|
|
934
|
+
public GetStartDelay () : number
|
|
935
|
+
public GetPauseDelay () : number
|
|
936
|
+
public Seek ($startTime: number, $startDelay: number) : void
|
|
937
|
+
public Seek ($startTime: number, $startDelay: number, $duration: number) : void
|
|
938
|
+
}
|
|
939
|
+
/** The mode in which an AudioMixer should update its time.
|
|
940
|
+
*/
|
|
941
|
+
enum AudioMixerUpdateMode
|
|
942
|
+
{ Normal = 0, UnscaledTime = 1 }
|
|
943
|
+
/** AudioMixer asset.
|
|
944
|
+
*/
|
|
945
|
+
class AudioMixer extends UnityEngine.Object
|
|
946
|
+
{
|
|
947
|
+
protected [__keep_incompatibility]: never;
|
|
948
|
+
/** Routing target.
|
|
949
|
+
*/
|
|
950
|
+
public get outputAudioMixerGroup(): UnityEngine.Audio.AudioMixerGroup;
|
|
951
|
+
public set outputAudioMixerGroup(value: UnityEngine.Audio.AudioMixerGroup);
|
|
952
|
+
/** How time should progress for this AudioMixer. Used during Snapshot transitions.
|
|
953
|
+
*/
|
|
954
|
+
public get updateMode(): UnityEngine.Audio.AudioMixerUpdateMode;
|
|
955
|
+
public set updateMode(value: UnityEngine.Audio.AudioMixerUpdateMode);
|
|
956
|
+
/** The name must be an exact match.
|
|
957
|
+
* @param $name Name of snapshot object to be returned.
|
|
958
|
+
* @returns The snapshot identified by the name.
|
|
959
|
+
*/
|
|
960
|
+
public FindSnapshot ($name: string) : UnityEngine.Audio.AudioMixerSnapshot
|
|
961
|
+
/** Connected groups in the mixer form a path from the mixer's master group to the leaves. This path has the format Master GroupChild of Master GroupGrandchild of Master Group, and so on. For example, in the hierarchy below, the group DROPS has the path MasterWATERDROPS. To return only the group called DROPS, enter DROPS. The substring MasterAMBIENCE returns three groups, AMBIENCECROWD, AMBIENCEROAD, and AMBIENCE. The substring R would return both ROAD and RIVER.
|
|
962
|
+
* @param $subPath Path sub-strings to match with.
|
|
963
|
+
* @returns Groups in the mixer whose paths match the specified search path.
|
|
964
|
+
*/
|
|
965
|
+
public FindMatchingGroups ($subPath: string) : System.Array$1<UnityEngine.Audio.AudioMixerGroup>
|
|
966
|
+
/** Transitions to a weighted mixture of the snapshots specified. This can be used for games that specify the game state as a continuum between states or for interpolating snapshots from a triangulated map location.
|
|
967
|
+
* @param $snapshots The set of snapshots to be mixed.
|
|
968
|
+
* @param $weights The mix weights for the snapshots specified.
|
|
969
|
+
* @param $timeToReach Relative time after which the mixture should be reached from any current state.
|
|
970
|
+
*/
|
|
971
|
+
public TransitionToSnapshots ($snapshots: System.Array$1<UnityEngine.Audio.AudioMixerSnapshot>, $weights: System.Array$1<number>, $timeToReach: number) : void
|
|
972
|
+
/** Sets the value of the exposed parameter specified. When a parameter is exposed, it is not controlled by mixer snapshots. You can only change the parameter with this function.
|
|
973
|
+
* @param $name The name of an exposed Audio Mixer group parameter. To expose a parameter, go to the Audio Mixer group's Inspector window, right click the parameter you want to expose, and choose Expose [parameter name] to script.
|
|
974
|
+
* @param $value Use to set the exposed Audio Mixer group parameter to a new value.
|
|
975
|
+
* @returns Returns false if the exposed parameter was not found or snapshots are currently being edited.
|
|
976
|
+
*/
|
|
977
|
+
public SetFloat ($name: string, $value: number) : boolean
|
|
978
|
+
/** Resets an exposed parameter to its initial value.
|
|
979
|
+
* @param $name Exposed parameter.
|
|
980
|
+
* @returns Returns false if the parameter was not found or could not be set.
|
|
981
|
+
*/
|
|
982
|
+
public ClearFloat ($name: string) : boolean
|
|
983
|
+
/** Returns the value of the exposed parameter specified. If the parameter doesn't exist the function returns false. Prior to calling SetFloat and after ClearFloat has been called on this parameter the value returned will be that of the current snapshot or snapshot transition.
|
|
984
|
+
* @param $name Name of exposed parameter.
|
|
985
|
+
* @param $value Return value of exposed parameter.
|
|
986
|
+
* @returns Returns false if the exposed parameter specified doesn't exist.
|
|
987
|
+
*/
|
|
988
|
+
public GetFloat ($name: string, $value: $Ref<number>) : boolean
|
|
989
|
+
}
|
|
990
|
+
/** Object representing a snapshot in the mixer.
|
|
991
|
+
*/
|
|
992
|
+
class AudioMixerSnapshot extends UnityEngine.Object
|
|
993
|
+
{
|
|
994
|
+
protected [__keep_incompatibility]: never;
|
|
995
|
+
public get audioMixer(): UnityEngine.Audio.AudioMixer;
|
|
996
|
+
/** Performs an interpolated transition towards this snapshot over the time interval specified.
|
|
997
|
+
* @param $timeToReach Relative time after which this snapshot should be reached from any current state.
|
|
998
|
+
*/
|
|
999
|
+
public TransitionTo ($timeToReach: number) : void
|
|
1000
|
+
}
|
|
1001
|
+
/** An implementation of IPlayable that controls an audio mixer.
|
|
1002
|
+
*/
|
|
1003
|
+
class AudioMixerPlayable extends System.ValueType implements UnityEngine.Playables.IPlayable, System.IEquatable$1<UnityEngine.Audio.AudioMixerPlayable>
|
|
1004
|
+
{
|
|
1005
|
+
protected [__keep_incompatibility]: never;
|
|
1006
|
+
public static Create ($graph: UnityEngine.Playables.PlayableGraph, $inputCount?: number, $normalizeInputVolumes?: boolean) : UnityEngine.Audio.AudioMixerPlayable
|
|
1007
|
+
public GetHandle () : UnityEngine.Playables.PlayableHandle
|
|
1008
|
+
public static op_Implicit ($playable: UnityEngine.Audio.AudioMixerPlayable) : UnityEngine.Playables.Playable
|
|
1009
|
+
public static op_Explicit ($playable: UnityEngine.Playables.Playable) : UnityEngine.Audio.AudioMixerPlayable
|
|
1010
|
+
public Equals ($other: UnityEngine.Audio.AudioMixerPlayable) : boolean
|
|
1011
|
+
}
|
|
1012
|
+
/** A PlayableBinding that contains information representing an AudioPlayableOutput.
|
|
1013
|
+
*/
|
|
1014
|
+
class AudioPlayableBinding extends System.Object
|
|
1015
|
+
{
|
|
1016
|
+
protected [__keep_incompatibility]: never;
|
|
1017
|
+
/** Creates a PlayableBinding that contains information representing an AudioPlayableOutput.
|
|
1018
|
+
* @param $key A reference to a UnityEngine.Object that acts as a key for this binding.
|
|
1019
|
+
* @param $name The name of the AudioPlayableOutput.
|
|
1020
|
+
* @returns Returns a PlayableBinding that contains information that is used to create an AudioPlayableOutput.
|
|
1021
|
+
*/
|
|
1022
|
+
public static Create ($name: string, $key: UnityEngine.Object) : UnityEngine.Playables.PlayableBinding
|
|
1023
|
+
}
|
|
1024
|
+
/** A IPlayableOutput implementation that will be used to play audio.
|
|
1025
|
+
*/
|
|
1026
|
+
class AudioPlayableOutput extends System.ValueType implements UnityEngine.Playables.IPlayableOutput
|
|
1027
|
+
{
|
|
1028
|
+
protected [__keep_incompatibility]: never;
|
|
1029
|
+
/** Returns an invalid AudioPlayableOutput.
|
|
1030
|
+
*/
|
|
1031
|
+
public static get Null(): UnityEngine.Audio.AudioPlayableOutput;
|
|
1032
|
+
/** Creates an AudioPlayableOutput in the PlayableGraph.
|
|
1033
|
+
* @param $graph The PlayableGraph that will contain the AnimationPlayableOutput.
|
|
1034
|
+
* @param $name The name of the output.
|
|
1035
|
+
* @param $target The AudioSource that will play the AudioPlayableOutput source Playable.
|
|
1036
|
+
* @returns A new AudioPlayableOutput attached to the PlayableGraph.
|
|
1037
|
+
*/
|
|
1038
|
+
public static Create ($graph: UnityEngine.Playables.PlayableGraph, $name: string, $target: UnityEngine.AudioSource) : UnityEngine.Audio.AudioPlayableOutput
|
|
1039
|
+
public GetHandle () : UnityEngine.Playables.PlayableOutputHandle
|
|
1040
|
+
public static op_Implicit ($output: UnityEngine.Audio.AudioPlayableOutput) : UnityEngine.Playables.PlayableOutput
|
|
1041
|
+
public static op_Explicit ($output: UnityEngine.Playables.PlayableOutput) : UnityEngine.Audio.AudioPlayableOutput
|
|
1042
|
+
public GetTarget () : UnityEngine.AudioSource
|
|
1043
|
+
public SetTarget ($value: UnityEngine.AudioSource) : void
|
|
1044
|
+
/** Gets the state of output playback when seeking.
|
|
1045
|
+
* @returns Returns true if the output plays when seeking. Returns false otherwise.
|
|
1046
|
+
*/
|
|
1047
|
+
public GetEvaluateOnSeek () : boolean
|
|
1048
|
+
/** Controls whether the output should play when seeking.
|
|
1049
|
+
* @param $value Set to true to play the output when seeking. Set to false to disable audio scrubbing on this output. Default is true.
|
|
1050
|
+
*/
|
|
1051
|
+
public SetEvaluateOnSeek ($value: boolean) : void
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
namespace UnityEngine.AudioClip {
|
|
1055
|
+
interface PCMReaderCallback
|
|
1056
|
+
{
|
|
1057
|
+
(data: System.Array$1<number>) : void;
|
|
1058
|
+
Invoke?: (data: System.Array$1<number>) => void;
|
|
1059
|
+
}
|
|
1060
|
+
var PCMReaderCallback: { new (func: (data: System.Array$1<number>) => void): PCMReaderCallback; }
|
|
1061
|
+
interface PCMSetPositionCallback
|
|
1062
|
+
{
|
|
1063
|
+
(position: number) : void;
|
|
1064
|
+
Invoke?: (position: number) => void;
|
|
1065
|
+
}
|
|
1066
|
+
var PCMSetPositionCallback: { new (func: (position: number) => void): PCMSetPositionCallback; }
|
|
1067
|
+
}
|
|
1068
|
+
namespace UnityEngine.Experimental.Audio {
|
|
1069
|
+
/** Provides access to the audio samples generated by Unity objects such as VideoPlayer.
|
|
1070
|
+
*/
|
|
1071
|
+
class AudioSampleProvider extends System.Object implements System.IDisposable
|
|
1072
|
+
{
|
|
1073
|
+
protected [__keep_incompatibility]: never;
|
|
1074
|
+
/** Unique identifier for this instance.
|
|
1075
|
+
*/
|
|
1076
|
+
public get id(): number;
|
|
1077
|
+
/** Index of the track in the object that created this provider.
|
|
1078
|
+
*/
|
|
1079
|
+
public get trackIndex(): number;
|
|
1080
|
+
/** Object where this provider came from.
|
|
1081
|
+
*/
|
|
1082
|
+
public get owner(): UnityEngine.Object;
|
|
1083
|
+
/** True if the object is valid.
|
|
1084
|
+
*/
|
|
1085
|
+
public get valid(): boolean;
|
|
1086
|
+
/** The number of audio channels per sample frame.
|
|
1087
|
+
*/
|
|
1088
|
+
public get channelCount(): number;
|
|
1089
|
+
/** The expected playback rate for the sample frames produced by this class.
|
|
1090
|
+
*/
|
|
1091
|
+
public get sampleRate(): number;
|
|
1092
|
+
/** The maximum number of sample frames that can be accumulated inside the internal buffer before an overflow event is emitted.
|
|
1093
|
+
*/
|
|
1094
|
+
public get maxSampleFrameCount(): number;
|
|
1095
|
+
/** Number of sample frames available for consuming with Experimental.Audio.AudioSampleProvider.ConsumeSampleFrames.
|
|
1096
|
+
*/
|
|
1097
|
+
public get availableSampleFrameCount(): number;
|
|
1098
|
+
/** Number of sample frames that can still be written to by the sample producer before overflowing.
|
|
1099
|
+
*/
|
|
1100
|
+
public get freeSampleFrameCount(): number;
|
|
1101
|
+
/** Then the free sample count falls below this threshold, the Experimental.Audio.AudioSampleProvider.sampleFramesAvailable event and associated native is emitted.
|
|
1102
|
+
*/
|
|
1103
|
+
public get freeSampleFrameCountLowThreshold(): number;
|
|
1104
|
+
public set freeSampleFrameCountLowThreshold(value: number);
|
|
1105
|
+
/** Enables the Experimental.Audio.AudioSampleProvider.sampleFramesAvailable events.
|
|
1106
|
+
*/
|
|
1107
|
+
public get enableSampleFramesAvailableEvents(): boolean;
|
|
1108
|
+
public set enableSampleFramesAvailableEvents(value: boolean);
|
|
1109
|
+
/** If true, buffers produced by ConsumeSampleFrames will get padded when silence if there are less available than asked for. Otherwise, the extra sample frames in the buffer will be left unchanged.
|
|
1110
|
+
*/
|
|
1111
|
+
public get enableSilencePadding(): boolean;
|
|
1112
|
+
public set enableSilencePadding(value: boolean);
|
|
1113
|
+
/** Pointer to the native function that provides access to audio sample frames.
|
|
1114
|
+
*/
|
|
1115
|
+
public static get consumeSampleFramesNativeFunction(): UnityEngine.Experimental.Audio.AudioSampleProvider.ConsumeSampleFramesNativeFunction;
|
|
1116
|
+
/** Release internal resources. Inherited from IDisposable.
|
|
1117
|
+
*/
|
|
1118
|
+
public Dispose () : void
|
|
1119
|
+
public ConsumeSampleFrames ($sampleFrames: Unity.Collections.NativeArray$1<number>) : number
|
|
1120
|
+
public add_sampleFramesAvailable ($value: UnityEngine.Experimental.Audio.AudioSampleProvider.SampleFramesHandler) : void
|
|
1121
|
+
public remove_sampleFramesAvailable ($value: UnityEngine.Experimental.Audio.AudioSampleProvider.SampleFramesHandler) : void
|
|
1122
|
+
public add_sampleFramesOverflow ($value: UnityEngine.Experimental.Audio.AudioSampleProvider.SampleFramesHandler) : void
|
|
1123
|
+
public remove_sampleFramesOverflow ($value: UnityEngine.Experimental.Audio.AudioSampleProvider.SampleFramesHandler) : void
|
|
1124
|
+
public SetSampleFramesAvailableNativeHandler ($handler: UnityEngine.Experimental.Audio.AudioSampleProvider.SampleFramesEventNativeFunction, $userData: System.IntPtr) : void
|
|
1125
|
+
/** Clear the native handler set with Experimental.Audio.AudioSampleProvider.SetSampleFramesAvailableNativeHandler.
|
|
1126
|
+
*/
|
|
1127
|
+
public ClearSampleFramesAvailableNativeHandler () : void
|
|
1128
|
+
public SetSampleFramesOverflowNativeHandler ($handler: UnityEngine.Experimental.Audio.AudioSampleProvider.SampleFramesEventNativeFunction, $userData: System.IntPtr) : void
|
|
1129
|
+
/** Clear the native handler set with Experimental.Audio.AudioSampleProvider.SetSampleFramesOverflowNativeHandler.
|
|
1130
|
+
*/
|
|
1131
|
+
public ClearSampleFramesOverflowNativeHandler () : void
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
namespace UnityEngine.Experimental.Audio.AudioSampleProvider {
|
|
1135
|
+
interface ConsumeSampleFramesNativeFunction
|
|
1136
|
+
{
|
|
1137
|
+
(providerId: number, interleavedSampleFrames: System.IntPtr, sampleFrameCount: number) : number;
|
|
1138
|
+
Invoke?: (providerId: number, interleavedSampleFrames: System.IntPtr, sampleFrameCount: number) => number;
|
|
1139
|
+
}
|
|
1140
|
+
var ConsumeSampleFramesNativeFunction: { new (func: (providerId: number, interleavedSampleFrames: System.IntPtr, sampleFrameCount: number) => number): ConsumeSampleFramesNativeFunction; }
|
|
1141
|
+
interface SampleFramesHandler
|
|
1142
|
+
{
|
|
1143
|
+
(provider: UnityEngine.Experimental.Audio.AudioSampleProvider, sampleFrameCount: number) : void;
|
|
1144
|
+
Invoke?: (provider: UnityEngine.Experimental.Audio.AudioSampleProvider, sampleFrameCount: number) => void;
|
|
1145
|
+
}
|
|
1146
|
+
var SampleFramesHandler: { new (func: (provider: UnityEngine.Experimental.Audio.AudioSampleProvider, sampleFrameCount: number) => void): SampleFramesHandler; }
|
|
1147
|
+
interface SampleFramesEventNativeFunction
|
|
1148
|
+
{
|
|
1149
|
+
(userData: System.IntPtr, providerId: number, sampleFrameCount: number) : void;
|
|
1150
|
+
Invoke?: (userData: System.IntPtr, providerId: number, sampleFrameCount: number) => void;
|
|
1151
|
+
}
|
|
1152
|
+
var SampleFramesEventNativeFunction: { new (func: (userData: System.IntPtr, providerId: number, sampleFrameCount: number) => void): SampleFramesEventNativeFunction; }
|
|
1153
|
+
}
|
|
1154
|
+
}
|