AudioClip.samples Manual     Reference     Scripting  
Scripting > Runtime Classes > AudioClip
AudioClip.samples

var samples : int

Description

The length of the audio clip in samples (Read Only)

JavaScript
function Start() {
Debug.Log(audio.clip.samples);
}

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void Start() {
Debug.Log(audio.clip.samples);
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Start():
Debug.Log(audio.clip.samples)