akrennmair/libmp3lame-js — pull request #3 by akumpf (2013-10-04 15:47:33+00:00)
Title: Allow hooking into VBR calls

I'm kinda shooting in the dark here, but I tried this on my local copy and it worked well. Please pull this if it seems correct.

Also added `self` call at the end since I needed to do that to expose Lame to other webworkers.

See my fork of your webworker here (that uses VBR):
https://github.com/chaoscollective/chaos-lib-client/blob/master/jsworkers/lame/encoder.js

There's also a compressed version of the javascript with changes incorporated in the parent folder if that's helpful.

I'm getting nice sounding (and well compressed files) for these settings:
```
encoder.postMessage({
cmd: 'init',
config: {
in_samplerate: 44100,
out_samplerate: 44100,
bitrate: 64, // doesn't matter with VBR
channels: 1,
vbr: 2,
vbr_min: 4, // min kbps
vbr_max: 128, // max kbps
vbr_q: 9 // quality of 9 gives both small files and good quality.
}
});
```