max-mapper / nets

nothing but nets. http client that works in node and browsers
http://npmjs.org/nets
101 stars 10 forks source link

Different buffer types returned in different contexts #8

Open danfinlay opened 9 years ago

danfinlay commented 9 years ago

When I run locally, I get a UInt8Array, but then when I run on gh-pages I'm getting Buffer objects, and then the AudioContext.decodeAudioData method complains that it isn't a proper buffer array.

Any idea why the context would change the return type?

danfinlay commented 9 years ago

I fixed this in my example for now by just checking for the buffer type and converting to the right type, but I'm not sure this is 100% ideal.

max-mapper commented 9 years ago

with browserify a buffer should also be a valid uint8array I think....