use local codec for fft, too

This commit is contained in:
Jakob Ketterl 2020-01-05 23:33:07 +01:00
parent c8c5ce8105
commit 9187bb4371
2 changed files with 7 additions and 2 deletions

View File

@ -230,10 +230,14 @@ AudioEngine.prototype.getBuffersize = function() {
}; };
function ImaAdpcmCodec() { function ImaAdpcmCodec() {
this.reset();
}
ImaAdpcmCodec.prototype.reset = function() {
this.stepIndex = 0; this.stepIndex = 0;
this.predictor = 0; this.predictor = 0;
this.step = 0; this.step = 0;
} };
ImaAdpcmCodec.imaIndexTable = [ -1, -1, -1, -1, 2, 4, 6, 8, -1, -1, -1, -1, 2, 4, 6, 8 ]; ImaAdpcmCodec.imaIndexTable = [ -1, -1, -1, -1, 2, 4, 6, 8, -1, -1, -1, -1, 2, 4, 6, 8 ];

View File

@ -29,7 +29,7 @@ var center_freq;
var fft_size; var fft_size;
var fft_fps; var fft_fps;
var fft_compression = "none"; var fft_compression = "none";
var fft_codec = new sdrjs.ImaAdpcm(); var fft_codec;
var waterfall_setup_done = 0; var waterfall_setup_done = 0;
var secondary_fft_size; var secondary_fft_size;
var rx_photo_state = 1; var rx_photo_state = 1;
@ -1942,6 +1942,7 @@ function openwebrx_init() {
} else { } else {
audioEngine.start(onAudioStart); audioEngine.start(onAudioStart);
} }
fft_codec = new ImaAdpcmCodec();
initProgressBars(); initProgressBars();
init_rx_photo(); init_rx_photo();
open_websocket(); open_websocket();