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

waveheader

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

waveheader

Writes a wave header based on options/size to a buffer, returns buffer

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
147
decreased by-65.49%
Maintainers
1
Weekly downloads
 
Created
Source

WaveHeader

Just generates a WAVE-file header, with the specified length as argument.

var header = require("waveheader");
//write to a normal fs.createWriteStream
myFileStream.write(header(44100 * 8)); // 44100 khz * 8 seconds


// using options (all available options listed)
myOtherFileStream.write(header(22050 * 8) {
  sampleRate: 22050,
  channels: 2,
  bitDepth: 8
}); 

Use with tonegenerator:

Also check out the module for generating tones as raw PCM data, tonegenerator.

using the debug module

Waveheader uses the 'debug' module to clean the output a bit. If running your program from the command line, and you wanna see the size written to the header, do DEBUG=waveheader node yourprogram.js

FAQs

Package last updated on 01 Sep 2013

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