]> sigrok.org Git - libsigrok.git/commitdiff
output/wav: use the right buffer for SR_DF_ANALOG
authorStefan Brüns <redacted>
Tue, 24 Nov 2015 21:31:35 +0000 (22:31 +0100)
committerUwe Hermann <redacted>
Sun, 29 Nov 2015 01:30:38 +0000 (02:30 +0100)
src/output/wav.c

index 87ac44ac463d840726d2ea12a193927f89ee8175..f991cbfdc68526d9fea8754ad200565b712076a9 100644 (file)
@@ -315,7 +315,7 @@ static int receive(const struct sr_output *o, const struct sr_datafeed_packet *p
                        for (j = 0; j < num_channels; j++) {
                                idx = chan_idx[j];
                                buf = outc->chanbuf[idx] + outc->chanbuf_used[idx]++ * 4;
-                               f = analog_old->data[i * num_channels + j];
+                               f = data[i * num_channels + j];
                                if (outc->scale != 0.0)
                                        f /= outc->scale;
                                float_to_le(buf, f);