]> code.delx.au - pulseaudio/blobdiff - polyp/parec-simple.c
* add variadic function pa_tagstruct_get() and pa_tagstruct_put() for parsing/constru...
[pulseaudio] / polyp / parec-simple.c
index 130627d741a02242f7bf6a7832b78c434498b820..524cc4f1665236a51951673eaeccdbeb0dc369a4 100644 (file)
@@ -30,6 +30,7 @@
 
 #include <polyp/polyplib-simple.h>
 #include <polyp/polyplib-error.h>
+#include "gccmacro.h"
 
 #define BUFSIZE 1024
 
@@ -47,26 +48,26 @@ static ssize_t loop_write(int fd, const void*data, size_t size) {
             break;
         
         ret += r;
-        data = (uint8_t*) data + r;
+        data = (const uint8_t*) data + r;
         size -= r;
     }
 
     return ret;
 }
 
-int main(int argc, char*argv[]) {
+int main(PA_GCC_UNUSED int argc, char*argv[]) {
     /* The sample type to use */
-    static const struct pa_sample_spec ss = {
+    static const pa_sample_spec ss = {
         .format = PA_SAMPLE_S16LE,
         .rate = 44100,
         .channels = 2
     };
-    struct pa_simple *s = NULL;
+    pa_simple *s = NULL;
     int ret = 1;
     int error;
 
     /* Create the recording stream */
-    if (!(s = pa_simple_new(NULL, argv[0], PA_STREAM_RECORD, NULL, "record", &ss, NULL, 0, &error))) {
+    if (!(s = pa_simple_new(NULL, argv[0], PA_STREAM_RECORD, NULL, "record", &ss, NULL, &error))) {
         fprintf(stderr, __FILE__": pa_simple_new() failed: %s\n", pa_strerror(error));
         goto finish;
     }