audiochorusfilter.timesamples 时间取样

2015-1-3 15:57| 发布者: 杨炎| 查看: 1767| 评论: 0|原作者: 蛮牛|来自: yzc88亚洲城脚本manual

摘要: audiosource.timesamples 时间取样vartimesamples: intdescription描述playback position in pcm samples.在pcm取样的播放位置。use this to read current playback time or to seek to a new playback time in samp ...

audiosource.timesamples 时间取样

vartimesamples: int

description描述

playback position in pcm samples.

在pcm取样的播放位置。

use this to read current playback time or to seek to a new playback time in samples, if you want more precise timing than whattimevariable allows.

使用这个读取当前播放时间或定位一个新的播放时间取样,如果你想比time变量允许更精确的计时。

参见:time变量

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

void update() {

if (input.getkeydown(keycode.return)) {

audio.stop();

audio.play();

}

debug.log(audio.timesamples);

}

}

// prints the elapsed time in samples the audio

// source has been playing.

// press "return" to start the song and see how the

// time sample gets restarted..

//以秒为单位,打印音频源已经播放所用的取样时间。

//按return键,开始播放,看看如何获取重新启动的时间

function update() {

if(input.getkeydown(keycode.return)) {

audio.stop();

audio.play();

}

debug.log(audio.timesamples);

}

相关阅读

文章点评
相关文章