-moved some burst output conditional code

This commit is contained in:
tvoid 2008-04-08 09:48:47 -06:00
parent be9f4a0844
commit f1000547ab
2 changed files with 14 additions and 15 deletions

View File

@ -96,14 +96,14 @@ int gsm_burst_cf::general_work (int noutput_items,
if (get_burst()) {
//found a burst, send to output
//ensure that output data is in range
int b = d_burst_start;
if (b < 0)
b = 0;
else if (b >= 2 * MAX_CORR_DIST)
b = 2 * MAX_CORR_DIST - 1;
if (out) {
//ensure that output data is in range
int b = d_burst_start;
if (b < 0)
b = 0;
else if (b >= 2 * MAX_CORR_DIST)
b = 2 * MAX_CORR_DIST - 1;
memcpy(out+rval*USEFUL_BITS, d_burst_buffer + b, USEFUL_BITS*sizeof(float));
rval++;
}

View File

@ -69,15 +69,14 @@ int gsm_burst_ff::general_work (int noutput_items,
if (get_burst()) {
//found a burst, send to output
//ensure that output data is in range
int b = d_burst_start;
if (b < 0)
b = 0;
else if (b >= 2 * MAX_CORR_DIST)
b = 2 * MAX_CORR_DIST - 1;
if (out) {
//ensure that output data is in range
int b = d_burst_start;
if (b < 0)
b = 0;
else if (b >= 2 * MAX_CORR_DIST)
b = 2 * MAX_CORR_DIST - 1;
memcpy(out+rval*USEFUL_BITS, d_burst_buffer + b, USEFUL_BITS*sizeof(float));
rval++;
}