Hi Steve, Yes, I see the bug/feature for the SM1000 in freedv_api.c.
I've "fixed" freedv_api.c and here is the result: No crashes but no output either. bash-4.4$ ~/bin/freedv_tx 700D 26aug18_really_good/2018-08-26-11.47.38_to_radio.700C junk8 --codectx codec2 in raw WAV out <- my added "fprintf" to make sure my command line "--codectx" worked. bash-4.4$ ls -l junk8 -rw-r--r-- 1 alanb tims 0 Aug 18 17:08 junk8 My "parrot" repeater depends on being able to capture the codec2 encoded audio data and re-transmitting it from this data. Alan VK2ZIW On Sat, 17 Aug 2019 05:49:47 -0500, Steve wrote > Looks like a bug snuck in with freedv_api.c > > https://github.com/drowe67/codec2/blob/master/src/freedv_api.c#L288 > > In order to save space on the SM1000 the f->mod_out isn't allocated. > > possible solution: > > #ifdef __EMBEDDED__ > /* only allocate this array for interleaver sizes > 1 to save memory > on SM1000 port */ > > if (f->interleave_frames > 1) { > #endif > > f->mod_out = > (COMP*)MALLOC(sizeof(COMP)*f->interleave_frames*f->n_nat_modem_samples); > if (f->mod_out == NULL) { > if (f->codeword_symbols != NULL) { FREE > (f->codeword_symbols); } > return NULL; > } > > for (int i=0; i<f->interleave_frames*f->n_nat_modem_samples; i++) > { > f->mod_out[i].real = 0.0; > f->mod_out[i].imag = 0.0; > } > #ifdef __EMBEDDED__ > } > #endif --------------------------------------------------- Alan Beard OpenWebMail 2.53
_______________________________________________ Freetel-codec2 mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freetel-codec2
