• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java PdListener类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.puredata.core.PdListener的典型用法代码示例。如果您正苦于以下问题:Java PdListener类的具体用法?Java PdListener怎么用?Java PdListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PdListener类属于org.puredata.core包,在下文中一共展示了PdListener类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: addListener

import org.puredata.core.PdListener; //导入依赖的package包/类
@Override
public void addListener(String source, PdListener listener) {
	Array<PdListener> listeners = this.listeners.get(source);
	if(listeners == null){
		Collection<Object> args = new ArrayList<Object>();
		args.add(1);
		OSCMessage msg = new OSCMessage("/subscribe/" + source, args);
		try {
			sender.send(msg);
		} catch (IOException e) {
			throw new PdRuntimeException(e);
		}
		this.listeners.put(source, listeners = new Array<PdListener>());
	}
	listeners.add(listener);
}
 
开发者ID:mgsx-dev,项目名称:gdx-pd,代码行数:17,代码来源:PdAudioRemote.java


示例2: addListener

import org.puredata.core.PdListener; //导入依赖的package包/类
@Override
public void addListener(String source, PdListener listener) {
	Array<PdListener> contextualListeners = listeners.get(source);
	if(contextualListeners == null){
		PdBase.subscribe(source);
		listeners.put(source, contextualListeners = new Array<PdListener>());
	}
	contextualListeners.add(listener);
}
 
开发者ID:mgsx-dev,项目名称:gdx-pd,代码行数:10,代码来源:PdAudioBase.java


示例3: removeListener

import org.puredata.core.PdListener; //导入依赖的package包/类
@Override
public void removeListener(String source, PdListener listener) {
	Array<PdListener> contextualListeners = listeners.get(source);
	if(contextualListeners != null){
		contextualListeners.removeValue(listener, true);
		if(contextualListeners.size <= 0){
			PdBase.unsubscribe(source);
			listeners.remove(source);
		}
	}
}
 
开发者ID:mgsx-dev,项目名称:gdx-pd,代码行数:12,代码来源:PdAudioBase.java


示例4: removeListener

import org.puredata.core.PdListener; //导入依赖的package包/类
@Override
public void removeListener(String source, PdListener listener) {
	Array<PdListener> listeners = this.listeners.get(source);
	if(listeners != null){
		listeners.removeValue(listener, true);
	}
}
 
开发者ID:mgsx-dev,项目名称:gdx-pd,代码行数:8,代码来源:PdAudioRemote.java


示例5: WavePreview

import org.puredata.core.PdListener; //导入依赖的package包/类
public WavePreview(Subpatch subpatch) {
	super(subpatch);
	PdHelper.addListener(array.name + ".change", new PdListener.Adapter(){
		@Override
		public void receiveBang(String source) {
			PdBase.readArray(array.buffer, 0, array.name, 0, array.buffer.length);
			parent.threadSafeInvalidate();
		}
	});
}
 
开发者ID:b2renger,项目名称:PdDroidPublisher,代码行数:11,代码来源:WavePreview.java


示例6: initPd

import org.puredata.core.PdListener; //导入依赖的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();
			}
		});

	}
 
开发者ID:twobigears,项目名称:Circle-Synth,代码行数:30,代码来源:SynthCircle.java


示例7: addListener

import org.puredata.core.PdListener; //导入依赖的package包/类
@Override
public void addListener(String source, PdListener listener) {
}
 
开发者ID:mgsx-dev,项目名称:gdx-pd,代码行数:4,代码来源:PdAudioNone.java


示例8: removeListener

import org.puredata.core.PdListener; //导入依赖的package包/类
@Override
public void removeListener(String source, PdListener listener) {
}
 
开发者ID:mgsx-dev,项目名称:gdx-pd,代码行数:4,代码来源:PdAudioNone.java


示例9: addListener

import org.puredata.core.PdListener; //导入依赖的package包/类
public static void addListener(String symbol, PdListener listener) 
{
	dispatcher.addListener(symbol, listener);
}
 
开发者ID:b2renger,项目名称:PdDroidPublisher,代码行数:5,代码来源:PdHelper.java


示例10: addListener

import org.puredata.core.PdListener; //导入依赖的package包/类
/**
 * add listener for symbol
 * @param source name of the symbol for which receive events.
 * @param listener
 * @throws PdRuntimeException on error
 */
public void addListener(String source, PdListener listener);
 
开发者ID:mgsx-dev,项目名称:gdx-pd,代码行数:8,代码来源:PdAudio.java


示例11: removeListener

import org.puredata.core.PdListener; //导入依赖的package包/类
/**
 * remove previously added listener
 * @param source
 * @param listener
 */
public void removeListener(String source, PdListener listener);
 
开发者ID:mgsx-dev,项目名称:gdx-pd,代码行数:7,代码来源:PdAudio.java



注:本文中的org.puredata.core.PdListener类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java EnhancedPatternLayout类代码示例发布时间:2022-05-22
下一篇:
Java DefaultResourceCalculator类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap