resin-io/audio-correction

Name: audio-correction

Owner: Resin.io

Description: Audio stream correction utilities.

Created: 2015-02-20 20:27:43.0

Updated: 2016-11-14 00:22:19.0

Pushed: 2015-02-20 20:36:20.0

Homepage: null

Size: 132

Language: CoffeeScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

audio-correction

npm version dependencies Build Status

Audio stream correction utilities.

Installation

Install audio-correction by running:

m install --save audio-correction
Documentation
Stream audioCorrection.skew(Object options)

Audio skew correction based on an specific date. It'll make sure an audio stream keeps playing on time.

Useful to keep multiple audio players in sync.

options

Example:

ker = require('speaker')
 = require('lame')
oCorrection = require('audio-correction')

der = new Lame.Decoder()

ream is an audio stream from somewhere
am.pipe(decoder)

der.on 'format', (format) ->
speaker = new Speaker(format)

decoder
    .pipe audioCorrection.skew
        start: new Date()
        format: format
        maximumSkew: 300
        onSkew: (skew, maximumSkew) =>
            console.warn("Error: Exceeds maximum skew of #{skew} (#{maximumSkew}ms.)")
    .pipe(speaker)
Tests

Run the test suite by doing:

lp test
TODO
Contribute

We're looking forward to support more operating systems. Please raise an issue or even better, send a PR to increase support!

Before submitting a PR, please make sure that you include tests, and that coffeelint runs without any warning:

lp lint
Support

If you're having any problem, please raise an issue on GitHub.

License

The project is licensed under the MIT license.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.