Comparing version 0.0.1 to 0.0.2
@@ -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` |
3762
78
27
1
+ Addeddebug@~0.7.2
+ Addeddebug@0.7.4(transitive)