add text output capabilities to filesink

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

@ -22,7 +22,8 @@
#ifndef SRSLTE_FORMAT_H
#define SRSLTE_FORMAT_H
typedef enum {
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