用户工具

站点工具


侧边栏

script:unityengine:classes:audioclip:audioclip

AudioClip 音频剪辑

class in UnityEngine / Inherits from: Object

Description 描述

A container for audio data.

用于音频数据的一个容器。

An AudioClip stores the audio file either compressed as ogg vorbis or uncompressed. AudioClips are referenced and used by AudioSources to play sounds.

一个音频剪辑储存压缩的ogg vorbis 或未压缩的音频文件。AudioClips被引用和被用于AudioSources播放声音。

Variables 变量

channelsThe number of channels in the audio clip. (Read Only)
该音频剪辑的通声道数。
frequencyThe sample frequency of the clip in Hertz. (Read Only)
音频剪辑的采样频率,单位赫兹。(只读)
lengthThe length of the audio clip in seconds. (Read Only)
该音频剪辑的长度,单位秒。(只读)
loadInBackgroundCorresponding to the “Load In Background” flag in the inspector, when this flag is set, the loading will happen delayed without blocking the main thread.
对应检视面板的Load In Background标识,当此标识设置为true,加载会延迟,而不会阻塞主线程。
loadStateReturns the current load state of the audio data associated with an AudioClip.
返回当前与音频相关的音频数据加载状态。
loadTypeThe load type of the clip (read-only).
该剪辑的加载类型。(只读)
preloadAudioDataPreloads 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.
当该剪辑资源被加载,预加载该剪辑的音频数据。当该标识为false,在剪辑播放之前,脚本必须调用AudioClip.LoadAudioData()来加
script/unityengine/classes/audioclip/audioclip.txt · 最后更改: 2016/08/02 05:37 (外部编辑)