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 - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

9

index.js

@@ -0,1 +1,4 @@

var debug = require('debug')('waveheader');
/*

@@ -12,3 +15,3 @@ * WaveHeader

* understand how to use the one above, so I made my own.
* You propably wanna use that one
* You propably wanna use that one
*/

@@ -29,3 +32,3 @@ module.exports = function generateHeader(length, options) {

var headerLength = 44;
var headerLength = 44;
var dataLength = length || MAX_WAV;

@@ -41,3 +44,3 @@ var fileSize = dataLength + headerLength;

// write the file size minus the identifier and this 32-bit int
console.log("Writing filesize: %d", fileSize);
debug("Writing filesize: %d", fileSize);
header['writeUInt32' + endianness](fileSize - 8, offset);

@@ -44,0 +47,0 @@ offset += 4;

@@ -5,8 +5,10 @@ {

"author": "karl westin <karl.westin@gmail.com>",
"repository" : {
"type" : "git",
"url" : "https://github.com/karlwestin/node-waveheader.git"
},
"dependencies": {},
"version": "0.0.1"
"repository": {
"type": "git",
"url": "https://github.com/karlwestin/node-waveheader.git"
},
"dependencies": {
"debug": "~0.7.2"
},
"version": "0.0.2"
}

@@ -18,1 +18,10 @@ WaveHeader

});
```
### Use with tonegenerator:
Also check out the module for generating tones as raw PCM data,
[tonegenerator](http://npmjs.com/package/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`
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