PCM サンプルの再生位置
using UnityEngine; using System.Collections;
[RequireComponent(typeof(AudioSource))] public class ExampleClass : MonoBehaviour { AudioSource audio; void Start() { audio = GetComponent<AudioSource>(); } void Update() { if (Input.GetKeyDown(KeyCode.Return)) { audio.Stop(); audio.Play(); } Debug.Log(audio.timeSamples); } }