OpusScript
libopus 1.3.1的JS绑定,随Emscripten一起移植。
用法
var OpusScript = require ( "opusscript" ) ;
// 48kHz sampling rate, 20ms frame duration, stereo audio (2 channels)
var samplingRate = 48000 ;
var frameDuration = 20 ;
var channels = 2 ;
// Optimize encoding for audio. Available applications are VOIP, AUDIO, and RESTRICTED_LOWDELAY
var encoder = new OpusScript ( samplingRate , channels , OpusScript
1