Acerca de su pregunta, parece que jQuery aún no lo admite. Antes de utilizarlo como sugerí a continuación, considere verificar si la función está disponible.
Con XHTMLRequest, puede engañar a su servidor y recibir una cadena binaria que representa los bytes que desea del servidor. Funciona perfectamente
var xhr = new XMLHttpRequest();
xhr.open('GET', '/your/audio/file.wav', true);
// Here is the hack
xhr.overrideMimeType('text/plain; charset=x-user-defined');
xhr.onreadystatechange = function(event) {
if (this.readyState == 4 && this.status == 200) {
var binaryString = this.responseText;
for (var i = 0, len = binaryString.length; i < len; ++i) {
var c = binaryString.charCodeAt(i);
var byte = c & 0xff; //it gives you the byte at i
//Do your cool stuff...
}
}
};
xhr.send();
Funciona, es común ... pero ... sigue siendo un truco.
Con XHTML Request Level 2, puede especificar responseType como 'arraybuffer' y recibir el ArrayBuffer en realidad. Es mucho mejor. El problema es verificar si su navegador admite esta característica.
var xhr = new XMLHttpRequest();
xhr.open('GET', '/your/audio/file.wav', true);
xhr.responseType = 'arraybuffer';
xhr.onload = function(e) {
if (this.status == 200) {
//Do your stuff here
}
};
xhr.send();
Hope I help.
Deberías probarlo y ver. – Musa