AudioListener 是神马?

AudioListener用于监听可记录对象,如 AudioPlayerAudioOutputAudioInput

每当可记录对象从音频系统接收到新的样本缓冲区,或在音频系统的请求下生成新的样本缓冲区时,它便会此缓冲区的副本传递给其监听器。

倘若要以回调的方式来接收样本,而不是使用对象的AudioBuffers来访问它们,则你可以实现此接口。

你可通过调用addListener方法将AudioListener添加到可记录对象。当然,若想要停止接收样本,请你调用removeListener方法。

Related:

AudioPlayer
AudioInput
AudioOutput

Example:

Here.

AudioListener 旗下:Methods

I just called to say I love you.
I just called to say how much I care.
——Stevie Wonder《I Just Called to Say I Love You》
【Minim】音乐加工厂:AudioListener 类

Just one:

samples()——点名要人

Description:

由音频对象调用,在对象有新样本时,添加AudioListener到该对象。

Signature:

void samples(float[] samp)
void samples(float[] sampL, float[] sampR)

Parameters:

samp — 来自 MONO 声音流的样本的 float [] 缓冲区
sampL — 一个 float [] 缓冲区,包含一个 STEREO 声音流的左声道
sampR — 一个 float [] 缓冲区,包含一个 STEREO 声音流的右声道

Returns:

None

Related:

AudioListener

Example:

Here.

Last…

In fact here’s just another ordinary day.
——Stevie Wonder《I Just Called to Say I Love You》
【Minim】音乐加工厂:AudioListener 类

相关文章: