npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mpg321

v0.1.5

Published

The mpg321 wrapper for Node.js

Downloads

18

Readme

mpg321

The mpg321 wrapper for Node.js

npm Dependency Status

Prerequisite

It requires mpg321.

In ubuntu, you can install mpg321:

$ sudo apt-get install mpg321

Install

$ npm install mpg321

Example

var
mpg321 = require('mpg321');

var
proc = mpg321()
  .loop(0) // infinity loop
  .file('./music.mp3')
  .exec();

// SIGINT hack
process.on('SIGINT', function (data) {
  process.exit();
});

or, use remote api.

var
mpg321 = require('mpg321');

var
file = './music.mp3',
player = mpg321().remote();

// infinity loop
player.play(file);
player.on('end', function () {
  console.log('end');
  player.play(file);
});

// SIGINT hack
process.on('SIGINT', function () {
  process.exit();
});

API

mpg321 = require('mpg321');

mpg321(options, files)

mpg321 is the mpg321 class constructor. options is the options passing as arguments to mpg321 command. (default is empty array []) files is the file list passing as arguments to mpg321 command. (default is empty array [])

mpg321(['-b'], ['./music.mp3'])

mpg321().option(options), mpg321().file(files)

add options or files.

mpg321().options('-b').file('./music.mp3')

mpg321().outputDevice(device)

Please read -o section of man mpg321.

mpg321().audioDevice(device)

Please read -a section of man mpg321.

mpg321().gain(volume)

Please read -g section of man mpg321.

mpg321().skip(frame)

Please read -k section of man mpg321.

mpg321().frames(frame)

Please read -n section of man mpg321.

mpg321().list(listFile)

Please read -@ section of man mpg321.

mpg321().wav(wavFile)

Please read -w section of man mpg321.

mpg321().loop(loopCount)

Please read -l section of man mpg321.

mpg321().cdr(cdrFile)

Please read --cdr section of man mpg321.

mpg321().au(auFile)

Please read --au section of man mpg321.

mpg321().shuffle()

Please read -z section of man mpg321.

mpg321().random()

Please read -z section of man mpg321.

mpg321().verbose()

Please read -v section of man mpg321.

mpg321().stdout()

Please read -s section of man mpg321.

mpg321().test()

Please read -t section of man mpg321.

mpg321().quiet()

Please read -q section of man mpg321.

mpg321().restart()

Please read -3 section of man mpg321.

mpg321().version()

Please read -V section of man mpg321.

mpg321().stereo()

Please read --stereo section of man mpg321.

mpg321().aggressive()

Please read --aggressive section of man mpg321.

mpg321().help()

Please read --help section of man mpg321.

mpg321().longhelp()

Please read --longhelp section of man mpg321.

mpg321().recursive()

Please read -B section of man mpg321.

mpg321().reportAudioScrobble()

Please read -S section of man mpg321.

mpg321().title()

Please read -x section of man mpg321.

mpg321().basicKeys()

Please read -K section of man mpg321.

mpg321().exec(execOptions, callback)

Call mpg321 command via child_process.execFile. If execOptions is callable, use as callback.

mpg321().spawn(spawnOptions)

Call mpg321 command via child_process.spawn.

mpg321().remote(fft)

Call mpg321 command with '-R' option. And if fft is true, append -F flag to options.

It returns mpg321.remote instance.

mpg321.remote().play(filename)

Please read LOAD command section of /usr/share/doc/mpg321/README.remote (debian).

mpg321.remote().jump(frame)

Please read JUMP command section of /usr/share/doc/mpg321/README.remote (debian).

mpg321.remote().gain(volume)

Please read GAIN command section of /usr/share/doc/mpg321/README.remote (debian).

mpg321.remote().pause()

Please read PAUSE command section of /usr/share/doc/mpg321/README.remote (debian).

mpg321.remote().stop()

Please read STOP command section of /usr/share/doc/mpg321/README.remote (debian).

mpg321.remote().quit()

Please read QUIT command section of /usr/share/doc/mpg321/README.remote (debian).

mpg321.remote's event stop, pause, resume and end

Please read @P section of /usr/share/doc/mpg321/README.remote (debian).

mpg321.remote's event error

Please read @E section of /usr/share/doc/mpg321/README.remote (debian).

mpg321.remote's event frame

Please read @F section of /usr/share/doc/mpg321/README.remote (debian).

mpg321.remote's event info

Please read @I section of /usr/share/doc/mpg321/README.remote (debian).

Author

TSUYUSATO Kitsune (GitHub: @MakeNowJust, Twitter: @make_now_just)

License

Apache-2.0. Please read LICENSE.

Contribute

  1. Fork this repository.
  2. Checkout your feature branch.
  3. Commit your change.
  4. Push and Pull request.

Welcome your pull request :smile: