Start streaming of sound/SDR just before main loop

This prevents buffer overflow during init/creation processes
This commit is contained in:
Andreas Eversberg
2017-02-25 07:09:53 +01:00
parent 04fd1ddcea
commit 2e1999b1ee
13 changed files with 82 additions and 8 deletions

View File

@@ -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;