X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Finput%2Fwav.c;h=243fd4ca2d984451a8cf68e889e187a03a607c31;hb=9a512113ca0cfb34e8a12c678573e3687590ab41;hp=186693047f123088b74790ab9d1c275ae4be34b2;hpb=0f33aaef545e7289a02dc8115b282b24bb16fc27;p=libsigrok.git diff --git a/src/input/wav.c b/src/input/wav.c index 18669304..243fd4ca 100644 --- a/src/input/wav.c +++ b/src/input/wav.c @@ -31,7 +31,7 @@ #define LOG_PREFIX "input/wav" /* How many bytes at a time to process and send to the session bus. */ -#define CHUNK_SIZE 4096 +#define CHUNK_SIZE 4096 /* Minimum size of header + 1 8-bit mono PCM sample. */ #define MIN_DATA_CHUNK_OFFSET 45 @@ -227,7 +227,8 @@ static void send_chunk(const struct sr_input *in, int offset, int num_samples) d += inc->unitsize; } - sr_analog_init(&analog, &encoding, &meaning, &spec, 0); + /* TODO: Use proper 'digits' value for this device (and its modes). */ + sr_analog_init(&analog, &encoding, &meaning, &spec, 2); packet.type = SR_DF_ANALOG; packet.payload = &analog; analog.num_samples = num_samples;