#include <polyp/polyplib-simple.h>
#include <polyp/polyplib-error.h>
+#include "gccmacro.h"
#define BUFSIZE 1024
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;
}