@ -256,11 +256,15 @@ int rf_soapy_stop_tx_stream(void* h)
void rf_soapy_flush_buffer ( void * h )
void rf_soapy_flush_buffer ( void * h )
{
{
int n ;
int n ;
cf_t tmp1 [ 1024 ] ;
cf_t dummy [ 1024 ] ;
cf_t tmp2 [ 1024 ] ;
void * data [ SRSRAN_MAX_CHANNELS ] = { } ;
void * data [ 2 ] = { tmp1 , tmp2 } ;
for ( int i = 0 ; i < SRSRAN_MAX_CHANNELS ; i + + ) {
data [ i ] = dummy ;
}
do {
do {
n = rf_soapy_recv_with_time_multi ( h , data , 1024 , 0 , NULL , NULL ) ;
n = rf_soapy_recv_with_time_multi ( h , data , sizeof ( dummy ) , 0 , NULL , NULL ) ;
} while ( n > 0 ) ;
} while ( n > 0 ) ;
}
}
@ -848,7 +852,9 @@ int rf_soapy_recv_with_time_multi(void* h,
int rf_soapy_recv_with_time ( void * h , void * data , uint32_t nsamples , bool blocking , time_t * secs , double * frac_secs )
int rf_soapy_recv_with_time ( void * h , void * data , uint32_t nsamples , bool blocking , time_t * secs , double * frac_secs )
{
{
return rf_soapy_recv_with_time_multi ( h , & data , nsamples , blocking , secs , frac_secs ) ;
void * data_multi [ SRSRAN_MAX_PORTS ] = { NULL } ;
data_multi [ 0 ] = data ;
return rf_soapy_recv_with_time_multi ( h , data_multi , nsamples , blocking , secs , frac_secs ) ;
}
}
int rf_soapy_send_timed ( void * h ,
int rf_soapy_send_timed ( void * h ,