module.exports = function(RED) {
	function  PlayAudioNode(config) {
		RED.nodes.createNode(this,config);
		var node = this;
		this.on('input', function(msg) {
			RED.comms.publish("playaudio", msg.payload);
		});
	}
	RED.nodes.registerType("play audio", PlayAudioNode);
}


module.exports = function(RED) {
	function  PlayAudioNode(config) {
		RED.nodes.createNode(this,config);
		var node = this;
		this.on('input', function(msg) {
			if(Buffer.isBuffer(msg.payload)){
				RED.comms.publish("playaudio", msg.payload);
			}
		});
	}
	RED.nodes.registerType("play audio", PlayAudioNode);
}


Make sure input data is a buffer
Make sure input data is a buffer
