sdr: scale sample for HackRF API
This commit is contained in:
parent
ac087634dd
commit
ee63483b8f
|
@ -55,6 +55,7 @@ static int rx_callback(hackrf_transfer *transfer)
|
|||
|
||||
static inline int8_t clamp_float2int8(float s)
|
||||
{
|
||||
s *= 127.0f;
|
||||
if(s >= 127.0f) {
|
||||
return 127;
|
||||
} else if(s <= -128.0f) {
|
||||
|
|
Loading…
Reference in a new issue