1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 10:05:46 -05:00

libfreedv: remove unacceptable abort(0) calls

This commit is contained in:
f4exb 2019-03-05 10:45:08 +01:00
parent b7f617a5fd
commit 4a0c4f3941
3 changed files with 7 additions and 5 deletions

View File

@ -187,7 +187,8 @@ struct freedv *freedv_open_advanced(int mode, struct freedv_advanced *adv) {
codec2_mode = CODEC2_MODE_700C;
break;
default:
assert(0);
codec2_mode = CODEC2_MODE_700C;
fprintf(stderr, "FreeDV::freedv_open_advanced: unknown mode default to FREEDV_MODE_700C");
}
f->cohpsk = cohpsk_create();
@ -932,7 +933,7 @@ static void freedv_comptx_700(struct freedv *f, COMP mod_out[]) {
break;
default:
nspare = 0;
assert(0);
fprintf(stderr, "FreeDV::freedv_comptx_700: unknown mode default to nspare = 0");
}
data_flag_index = codec2_get_spare_bit_index(f->codec2);
@ -1674,7 +1675,7 @@ static int freedv_comprx_700(struct freedv *f, COMP demod_in_8kHz[], int *valid)
break;
default:
nspare = 0;
assert(0);
fprintf(stderr, "FreeDV::freedv_comprx_700: unknown mode default to nspare = 0");
}
for(k=0; k<nspare; k++) {

View File

@ -76,7 +76,7 @@ int choose_interleaver_b(int Nbits)
/* if we get it means a Nbits we dont have in our table so choke */
assert(0);
fprintf(stderr, "FreeDV::choose_interleaver_b: Nbits not in table return 0 as default");
return 0;
}

View File

@ -1534,7 +1534,8 @@ void ofdm_set_sync(struct OFDM *ofdm, Sync sync_cmd) {
ofdm->sync_mode = manualsync;
break;
default:
assert(0);
fprintf(stderr, "FreeDV::ofdm_set_sync: unknnown sync mode default to autosync");
ofdm->sync_mode = autosync;
}
}