Start streaming of sound/SDR just before main loop
This prevents buffer overflow during init/creation processes
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <math.h>
|
||||
#include "sample.h"
|
||||
#include "filter.h"
|
||||
@@ -227,6 +228,20 @@ error:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* start streaming */
|
||||
int sdr_start(void __attribute__((__unused__)) *inst)
|
||||
{
|
||||
// sdr_t *sdr = (sdr_t *)inst;
|
||||
|
||||
#ifdef HAVE_UHD
|
||||
return uhd_start();
|
||||
#endif
|
||||
#ifdef HAVE_SOAPY
|
||||
return soapy_start();
|
||||
#endif
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
void sdr_close(void *inst)
|
||||
{
|
||||
sdr_t *sdr = (sdr_t *)inst;
|
||||
|
Reference in New Issue
Block a user