convertbuffertowav

0.0.14 • Public • Published

convertBufferToWav

It is a helper converting audio buffer in to wav format

npm-img npm-url

nodei.co

Install

$ npm install --save @bigear/convertBufferToWav

Usage

 
import convertBufferToWav from "@bigear/convertBufferToWav";
 
const {buffer} = this.bufferSourceNode
// console.log(buffer.getChannelData(1))
// AudioBufferSourceNode ...
// buffer : AudioBuffer ...
// channelCount: 2
// channelCountMode: "max"
// channelInterpretation: "speakers"
// context: AudioContext ...
// currentTime: 10.518639455782314, sampleRate: 44100, ...
// detune: AudioParam ...
// loop: false
 
const dataview = convertBufferToWav(buffer.getChannelData(0))
const audioBlob = new Blob([dataview], {type: 'audio/wav'})
 

/convertbuffertowav/

    Package Sidebar

    Install

    npm i convertbuffertowav

    Weekly Downloads

    1

    Version

    0.0.14

    License

    ISC

    Unpacked Size

    3.15 kB

    Total Files

    4

    Last publish

    Collaborators

    • wahengchang