Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

audiobufferchnl

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

audiobufferchnl

AudioBufferChnl = Chnl + BufferSourceNode

  • 0.0.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 19 Dec 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc