/pull-audio-speaker

Output to speaker as a pull-stream sink

Primary LanguageJavaScriptMIT LicenseMIT

pull-audio-speaker

Output to speaker as a pull-stream sink

pull(
  generator(Math.random),
  speaker()
)

It uses audio-speaker internally

Install

npm install --save pull-audio-speaker
yarn add pull-audio-speaker

Usage

speaker(options?, onEnd?)

Returns a pull-stream sink that plays audio buffers in speaker.

It takes the same options as audio-speaker

pull(
  oscillator(),
  gain(0.6),
  speaker(err => {
    // done
  })
)

Also see