diff options
author | tvoid <tvoid@lesaige.com> | 2008-04-08 09:48:47 -0600 |
---|---|---|
committer | tvoid <tvoid@lesaige.com> | 2008-04-08 09:48:47 -0600 |
commit | f1000547abca6845028b5b69263ea9127ff28944 (patch) | |
tree | ab920abb414f475b0b78101f0d36ad1ee5ebdee9 /gsm-tvoid/src/lib | |
parent | be9f4a08449c2bff807f8987e8f58a1705ee4bcb (diff) |
-moved some burst output conditional code
Diffstat (limited to 'gsm-tvoid/src/lib')
-rwxr-xr-x | gsm-tvoid/src/lib/gsm_burst_cf.cc | 14 | ||||
-rwxr-xr-x | gsm-tvoid/src/lib/gsm_burst_ff.cc | 15 |
2 files changed, 14 insertions, 15 deletions
diff --git a/gsm-tvoid/src/lib/gsm_burst_cf.cc b/gsm-tvoid/src/lib/gsm_burst_cf.cc index df182a6..e9fe0fc 100755 --- a/gsm-tvoid/src/lib/gsm_burst_cf.cc +++ b/gsm-tvoid/src/lib/gsm_burst_cf.cc @@ -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++; } diff --git a/gsm-tvoid/src/lib/gsm_burst_ff.cc b/gsm-tvoid/src/lib/gsm_burst_ff.cc index 086f21b..f4aec06 100755 --- a/gsm-tvoid/src/lib/gsm_burst_ff.cc +++ b/gsm-tvoid/src/lib/gsm_burst_ff.cc @@ -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++; } |