Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

sdlmixer addon for nodejs

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 src
Octocat-spinner-32 test
Octocat-spinner-32 wavs
Octocat-spinner-32 .gitignore
Octocat-spinner-32 CHANGES
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 TODO
Octocat-spinner-32 package.json
Octocat-spinner-32 sdlmixer.js
Octocat-spinner-32 wscript
README.md

node-sdlmixer

This node addon was originally started due the "Low-Latency Cross-Platform Audio Playback" thread on the node mailinglist at http://groups.google.com/group/nodejs/browse_thread/thread/5b62789562697956

Requirements for compilation:

  • node
  • node-waf
  • SDL-dev
  • SDL_mixer-dev

tested on ubuntu 11.04 (64bit) with:

  • installing nodejs
  • sudo apt-get install libsdl1.2-dev
  • sudo apt-get install libsdlmixer1.2-dev

tested on osx 10.6.7 + brew

  • install nodejs
  • brew install sdl
  • brew install sdl_mixer

Install with npm

npm install sdlmixer

Build from source

git clone git://github.com/japj/node-sdlmixer.git cd node-sdlmixer node-waf configure build

Simple usage example

$ node
> var p = require("sdlmixer");
Opened audio at 22050 Hz 16 bit stereo
numChannels[32]
> p.play("github/node-sdlmixer/wavs/alarm.wav");
Loading github/node-sdlmixer/wavs/alarm.wav
'github/node-sdlmixer/wavs/alarm.wav'
> Playing on channel[1]
Done
Something went wrong with that request. Please try again.