文档

Unity Engine

Unity Engine

frequency

The sample frequency of the clip in Hertz. (Read Only)
阅读时间1 分钟最后更新于 5 天前

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.AudioModule
public int frequency { get; }

Remarks

Until the audio data is loaded (see AudioClip.loadState), this reports the frequency of the imported clip.
WebGL: The browser decodes audio data asynchronously. Once the clip is loaded, this reports the frequency of the decoded audio. Browsers resample decoded audio to the sample rate of their audio output, so this can differ from the imported frequency.