kopia lustrzana https://github.com/F5OEO/rpitx
Reading from pipe could read less than request
rodzic
d1e37d0c3c
commit
513da11267
23
src/RpiTx.c
23
src/RpiTx.c
|
@ -1427,20 +1427,23 @@ int pitx_run(
|
|||
if(NbRead!=DmaSampleBurstSize*2*sizeof(float))
|
||||
{
|
||||
printf("rpitx: NbRead %d/%d\n",NbRead,DmaSampleBurstSize*2*sizeof(float));
|
||||
if(loop_mode_flag==1)
|
||||
{
|
||||
printf("Looping FileIn\n");
|
||||
reset();
|
||||
}
|
||||
else if (!useStdin) {
|
||||
stop_dma();
|
||||
return 0;
|
||||
}
|
||||
if(NbRead<=0)
|
||||
{
|
||||
if(loop_mode_flag==1)
|
||||
{
|
||||
printf("Looping FileIn\n");
|
||||
reset();
|
||||
}
|
||||
else if (!useStdin) {
|
||||
stop_dma();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
for(i=0;i<DmaSampleBurstSize;i++)
|
||||
for(i=0;i<NbRead/(2*sizeof(float));i++)
|
||||
{
|
||||
//static float samplerate=48000;
|
||||
static int amp;
|
||||
|
|
Ładowanie…
Reference in New Issue