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

alac2pcm

v1.1.0

Published

A streaming libary and command line tool for converting Apple Lossless audio to raw PCM audio

Downloads

49

Readme

alac2pcm

A Node.js streaming libary and command line tool that converts Apple Lossless (ALAC) audio to raw PCM audio.

Build status js-standard-style

CLI usage

Install as a global module:

npm install -g alac2pcm

Pipe binary ALAC bytes into STDIN and, alac2pcm will output raw PCM audio bytes on STDOUT:

cat audio.alac | alac2pcm > audio.pcm

For a list of available configuration options, write:

alac2pcm --help

Programmatic usage

Install as a local module:

npm install --save alac2pcm

Then you can just use it as a regular node stream:

var Alac2Pcm = require('alac2pcm')

var options = {
  bitDepth: 8
}
var alac2pcm = new Alac2Pcm(options)

sourceAlacStream.pipe(alac2pcm).pipe(pcmPlayer)

Configuration

When instantiating the Alac2Pcm object an optional options object can be provided:

  • frameLength - (default: 352) Indicating the frames per packet when no explicit frames per packet setting is present in the packet header. The encoder frames per packet can be explicitly set but for maximum compatibility, the default encoder setting of 4096 should be used
  • bitDepth - (default: 16) Describes the bit depth of the source PCM data (maximum value = 32)
  • channels - (default: 2) Describes the channel count (1 = mono, 2 = stereo, etc...). When channel layout info is not provided in the 'magic cookie', a channel count > 2 describes a set of discreet channels with no specific ordering
  • maxFrameBytes - (default: 0) The maximum size of an Apple Lossless packet within the encoded stream. Value of 0 indicates unknown
  • avgBitRate - (default: 0) The average bit rate in bits per second of the Apple Lossless stream. Value of 0 indicates unknown
  • sampleRate - (default: 44100) Sample rate of the encoded stream

Aditional, but currently unused options:

  • compatibleVersion - (default: 0) Indicating compatible version. Value must be set to 0
  • pb - (default: 40) Currently unused tuning parameter. Value should be set to 40
  • mb - (default: 10) Currently unused tuning parameter. Value should be set to 10
  • kb - (default: 14) Currently unused tuning parameter. Value should be set to 14
  • maxRun - (default: 255) Currently unused. Value should be set to 255

Todo's

  • Support for Node.js 0.12 and 4

License

MIT