Buffer Samplerate Javascript
AudioMatt
6月 16 2019 | 3:54 午前
I know this is silly but I nearly missed that I could deduce the sample rate of a buffer like this so for anyone searching in the future:
function bang(){
var buf = new Buffer("myBuffer");
post("samplerate: ",buf.samplerate(),"\n");
}
Buffer.prototype.samplerate = function(){
return 1000*this.framecount()/this.length()
}
DominicThibault
8月 16 2024 | 3:42 午後
Thanks! This has proved useful!