Skip to content

Instantly share code, notes, and snippets.

@coma
Created February 21, 2013 10:50
Show Gist options
  • Save coma/5003885 to your computer and use it in GitHub Desktop.
Save coma/5003885 to your computer and use it in GitHub Desktop.
if (ret == MPG123_NEW_FORMAT) {
var format = binding.mpg123_getformat(mh);
debug('new format!', format);
self.emit('format', format);
var positionTimeIntervalID = setInterval(function() {
var current = binding.mpg123_tellframe(mh);
var total = binding.mpg123_length(mh);
self.emit('update', current, total);
}, 0);
return read();
}
Handle<Value> node_mpg123_length (const Arguments& args) {
UNWRAP_MH;
return scope.Close(Number::New(mpg123_length(mh)));
}
NODE_SET_METHOD(target, "mpg123_length", node_mpg123_length);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment