AudioClip.channels 声道数

var channels : int

Description描述

Channels in audio clip (Read Only)

音频剪辑的声道数。(只读)

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		Debug.Log(audio.clip.channels);
	}
}
// Prints how many channels the attached audio source has
// 1 --> Mono 单声道
// 2+ Stereo 立体声
//打印音频源有多少声道
Debug.Log(audio.clip.channels); 
Page last updated: 2011-1-13