add text output capabilities to filesink

master
Andre Puschmann 6 years ago
parent 62dad5e21d
commit 13c17ad9e7

@ -23,6 +23,7 @@
#define SRSLTE_FORMAT_H
typedef enum {
SRSLTE_TEXT,
SRSLTE_FLOAT,
SRSLTE_COMPLEX_FLOAT,
SRSLTE_COMPLEX_SHORT,

@ -53,6 +53,9 @@ int srslte_filesink_write(srslte_filesink_t *q, void *buffer, int nsamples) {
int size;
switch(q->type) {
case SRSLTE_TEXT:
fprintf(q->f, "%s",(char *)buffer);
break;
case SRSLTE_FLOAT:
for (i=0;i<nsamples;i++) {
fprintf(q->f,"%g\n",fbuf[i]);

Loading…
Cancel
Save