Socket
Socket
Sign inDemoInstall

audiobufferchnl

Package Overview
Dependencies
4
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    audiobufferchnl

AudioBufferChnl = Chnl + BufferSourceNode


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
2.41 MB
Created
Weekly downloads
 

Readme

Source

audiobufferchnl

audiobufferchnl = BufferSourceNode + chnl

This package extends the chnl module and adds the possibility to turn a webaudio BufferSourceNode into a chnl. This adds a lot of advantages. For further information, have a look at chnl.

audiobufferchnl is a part of the sountility collection!

Methods

Constructor

new AudioBufferChnl(audioCtx, bufferSourceNode)

To create a new instance, use the constructor like this. The first parameter audioCtx must be an AudioContext object. The second parameter bufferSourceNode must be a BufferSourceNode object.

Change the BufferSourceNode

.setBufferSourceNode(bufferSourceNode)

Accessing the BufferSourceNode

To directly gain access the BufferSourceNode object, use the bufferSourceNode field.

.bufferSourceNode

Example

const audioCtx = new AudioContext();
const buffer = audioCtx.createBuffer(2, audioCtx.sampleRate * 2.0, audioCtx.sampleRate);
const sourceNode = audioCtx.createBufferSource();
sourceNode.buffer = buffer;

const bufferChnl = new AudioBufferChnl(sourceNode, audioCtx);
// Do something with the bufferChnl

FAQs

Last updated on 19 Dec 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc