提交 fbcbbfe6 编写于 作者: M manjaro-xfce

使用rtl_sdr直接作为stdout输出,测试成功

上级 cfc6b549
......@@ -352,7 +352,7 @@ int do_resample(const cmdlineParser & args)
const int samples = packagedta.size()/sizeof(char);
for (int spid = 0;spid < samples; ++spid )
{
input_f[0][input_clk % nBatchSize] = pdata[spid];
input_f[0][input_clk % nBatchSize] = ((short)(pdata[spid])-127)*128;
++input_clk;
if (input_clk % nBatchSize==0)
calc_resample();
......@@ -360,12 +360,12 @@ int do_resample(const cmdlineParser & args)
}
else
{
const unsigned (* pdata)[2] = (const unsigned ( *)[2]) packagedta.data();
const unsigned char (* pdata)[2] = (const unsigned char ( *)[2]) packagedta.data();
const int samples = packagedta.size()/sizeof(char)/2;
for (int spid = 0;spid < samples; ++ spid)
{
input_f[0][input_clk % nBatchSize] = pdata[spid][0];
input_f[1][input_clk % nBatchSize] = pdata[spid][1];
input_f[0][input_clk % nBatchSize] = ((short)(pdata[spid][0])-127)*128;
input_f[1][input_clk % nBatchSize] = ((short)(pdata[spid][1])-127)*128;
++input_clk;
if (input_clk % nBatchSize==0)
calc_resample();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册