本文整理汇总了Java中org.puredata.android.utils.PdUiDispatcher类的典型用法代码示例。如果您正苦于以下问题:Java PdUiDispatcher类的具体用法?Java PdUiDispatcher怎么用?Java PdUiDispatcher使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PdUiDispatcher类属于org.puredata.android.utils包,在下文中一共展示了PdUiDispatcher类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: GdxPDAndroid
import org.puredata.android.utils.PdUiDispatcher; //导入依赖的package包/类
public GdxPDAndroid(final Context ctx) {
context = ctx;
sampleRate = AudioParameters.suggestSampleRate();
inChannels = 0;
outChannels = 2;
ticksPerBuffer = 8;
restart = true;
dispatcher = new PdUiDispatcher();
PdBase.setReceiver(dispatcher);
}
示例2: initPd
import org.puredata.android.utils.PdUiDispatcher; //导入依赖的package包/类
private void initPd() throws IOException {
// Configure the audio glue
int sampleRate = AudioParameters.suggestSampleRate();
pdService.initAudio(sampleRate, 1, 2, 10.0f);
pdService.startAudio();
start();
// Create and install the dispatcher
dispatcher = new PdUiDispatcher();
PdBase.setReceiver(dispatcher);
}
示例3: initPd
import org.puredata.android.utils.PdUiDispatcher; //导入依赖的package包/类
protected void initPd() throws IOException {
// Configure the audio glue
int sampleRate = AudioParameters.suggestSampleRate();
// reducing sample rate based on no. of cores
if (getNumCores() == 1)
sampleRate = sampleRate / 4;
else
sampleRate = sampleRate / 2;
pdService.initAudio(sampleRate, 0, 2, 10.0f);
pdService.startAudio(new Intent(this, SynthCircle.class),
R.drawable.notif_icon, "CircleSynth", "Return to Circle Synth");
dispatcher = new PdUiDispatcher();
PdBase.setReceiver(dispatcher);
dispatcher.addListener("scan", new PdListener.Adapter() {
@Override
public void receiveFloat(String source, final float x) {
scanline = x;
detect();
sendPdValue();
}
});
}
示例4: initPd
import org.puredata.android.utils.PdUiDispatcher; //导入依赖的package包/类
protected void initPd() throws IOException {
// Configure the audio glue
int sampleRate = AudioParameters.suggestSampleRate();
pdService.initAudio(sampleRate, 0, 2, 10.0f);
pdService.startAudio(new Intent(this, MainActivity.class),
R.drawable.icon, "Sample", "Return to Processing");
dispatcher = new PdUiDispatcher();
PdBase.setReceiver(dispatcher);
}