0.1.2 • Published 9 years ago

sm-parsers v0.1.2

Weekly downloads
6
License
MIT
Repository
github
Last release
9 years ago

sm-parsers

This package provides frame parsers for MP3 and AAC audio. They are used in StreamMachine for parsing incoming audio sources.

How to Use

Both parsers take an IO stream in and emit frame events for each audio frame. Events are also emitted for header, id3v1, id3v2 and debug.

Example:

    fs = require "fs"
    Parser = (require "sm-parsers").MP3

    mp3 = fs.createReadStream("./mymp3.mp3")

    p = new Parser

    p.on "frame", (frame,header) ->
      # do something...

    mp3.pipe(p)