Documentation

Unity Engine

Unity Engine

frequency

The sample frequency of the clip in Hertz. (Read Only)
Read time 1 minuteLast updated 6 days ago

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.