]> sigrok.org Git - libsigrok.git/blobdiff - src/output/wav.c
Build: Set local include directories in Makefile.am
[libsigrok.git] / src / output / wav.c
index add2d99996672304a029191b036280db98b4705d..c23602354d969abc078e52f1cf39c0bf63fd4b61 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #include <string.h>
-#include "libsigrok.h"
+#include <libsigrok/libsigrok.h>
 #include "libsigrok-internal.h"
 
 #define LOG_PREFIX "output/wav"
@@ -229,6 +229,7 @@ static int check_chanbuf_size(const struct sr_output *o)
 
        return size;
 }
+
 static int receive(const struct sr_output *o, const struct sr_datafeed_packet *packet,
                GString **out)
 {
@@ -335,15 +336,13 @@ static int cleanup(struct sr_output *o)
 
 static struct sr_option options[] = {
        { "scale", "Scale", "Scale values by factor", NULL, NULL },
-       { 0 }
+       ALL_ZERO
 };
 
-static struct sr_option *get_options(void)
+static const struct sr_option *get_options(void)
 {
-       if (!options[0].def) {
-               options[0].def = g_variant_new_double(0.0);
-               g_variant_ref_sink(options[0].def);
-       }
+       if (!options[0].def)
+               options[0].def = g_variant_ref_sink(g_variant_new_double(0.0));
 
        return options;
 }
@@ -351,10 +350,11 @@ static struct sr_option *get_options(void)
 SR_PRIV struct sr_output_module output_wav = {
        .id = "wav",
        .name = "WAV",
-       .desc = "WAVE file format",
+       .desc = "Microsoft WAV file format",
+       .exts = (const char*[]){"wav", NULL},
+       .flags = 0,
        .options = get_options,
        .init = init,
        .receive = receive,
        .cleanup = cleanup,
 };
-