Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jack-connector

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jack-connector

Bindings JACK-Audio-Connection-Kit for Node.JS

  • 0.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Node.JS JACK-connector

Bindings JACK-Audio-Connection-Kit for Node.JS

Install

npm install jack-connector

Build requirements

libjack2, libjack2-devel

How to use

var jackConnector = require('jack-connector');
jackConnector.openClientSync('Noize Generator');
jackConnector.registerOutPortSync('output');

function audioProcess(err, nframes) {
	if (err) {
		console.error(err);
		process.exit(1);
		return;
	}

	var ret = [];
	for (var i=0; i<nframes; i++) ret.push((Math.random() * 2) - 1);
	return { output: ret };
}

jackConnector.bindProcessSync(audioProcess);
jackConnector.activateSync();
jackConnector.connectPortSync('Noize Generator:output', 'system:playback_1');
jackConnector.connectPortSync('Noize Generator:output', 'system:playback_2');

(function mainLoop() { setTimeout(mainLoop, 1000000000); })();

process.on('SIGTERM', function () {
	jackConnector.deactivateSync();
	jackConnector.closeClient(function (err) {
		if (err) {
			console.error(err);
			process.exit(1);
			return;
		}

		process.exit(0);
	});
});

More examples

examples/

Author

Viacheslav Lotsmanov

License

MIT

Keywords

FAQs

Package last updated on 27 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc