ao_shutdown();
}
-static void start(int sample_rate, int sample_format) {}
+static void start(__attribute__((unused)) int sample_rate,
+ __attribute__((unused)) int sample_format) {}
static void play(short buf[], int samples) { ao_play(dev, (char *)buf, samples * 4); }
int Fs;
long long starttime, samples_played;
-static int init(int argc, char **argv) { return 0; }
+static int init(__attribute__((unused)) int argc, __attribute__((unused)) char **argv) { return 0; }
static void deinit(void) {}
-static void start(int sample_rate, int sample_format) {
+static void start(int sample_rate, __attribute__((unused)) int sample_format) {
Fs = sample_rate;
starttime = 0;
samples_played = 0;
debug(1, "dummy audio output started at Fs=%d Hz\n", sample_rate);
}
-static void play(short buf[], int samples) {}
+static void play(__attribute__((unused)) short buf[], __attribute__((unused)) int samples) {}
static void stop(void) { debug(1, "dummy audio stopped\n"); }
void stream_success_cb(pa_stream *stream, int success, void *userdata);
void stream_write_cb(pa_stream *stream, size_t requested_bytes, void *userdata);
-static int init(int argc, char **argv) {
+static int init(__attribute__((unused)) int argc, __attribute__((unused)) char **argv) {
// set up default values first
config.audio_backend_buffer_desired_length = 0.35;
// debug(1, "pa deinit done");
}
-static void start(int sample_rate, int sample_format) {
+static void start(__attribute__((unused)) int sample_rate,
+ __attribute__((unused)) int sample_format) {
uint32_t buffer_size_in_bytes = (uint32_t)2 * 2 * RATE * 0.1; // hard wired in here
// debug(1, "pa_buffer size is %u bytes.", buffer_size_in_bytes);
.parameters = NULL,
.mute = NULL};
-void context_state_cb(pa_context *context, void *mainloop) {
+void context_state_cb(__attribute__((unused)) pa_context *context, void *mainloop) {
pa_threaded_mainloop_signal(mainloop, 0);
}
-void stream_state_cb(pa_stream *s, void *mainloop) { pa_threaded_mainloop_signal(mainloop, 0); }
+void stream_state_cb(__attribute__((unused)) pa_stream *s, void *mainloop) {
+ pa_threaded_mainloop_signal(mainloop, 0);
+}
-void stream_write_cb(pa_stream *stream, size_t requested_bytes, void *userdata) {
+void stream_write_cb(pa_stream *stream, size_t requested_bytes,
+ __attribute__((unused)) void *userdata) {
/*
// play with timing information
// bytes we can transfer will never be greater than the bytes available
pa_stream_begin_write(stream, (void **)&buffer, &bytes_we_can_transfer);
- if (bytes_we_can_transfer <= (audio_umb - audio_toq)) {
+ if (bytes_we_can_transfer <= (size_t)(audio_umb - audio_toq)) {
// the bytes are all in a row in the audo buffer
memcpy(buffer, audio_toq, bytes_we_can_transfer);
audio_toq += bytes_we_can_transfer;
// %d.",requested_bytes/4,bytes_transferred/4,pa_stream_is_corked(stream));
}
-void alt_stream_write_cb(pa_stream *stream, size_t requested_bytes, void *userdata) {
+void alt_stream_write_cb(pa_stream *stream, size_t requested_bytes,
+ __attribute__((unused)) void *userdata) {
// debug(1, "***Bytes requested bytes %d.", requested_bytes);
- int bytes_remaining = requested_bytes;
+ size_t bytes_remaining = requested_bytes;
while (bytes_remaining > 0) {
uint8_t *buffer = NULL;
size_t bytes_to_fill = 44100;
}
}
-void stream_success_cb(pa_stream *stream, int success, void *userdata) { return; }
+void stream_success_cb(__attribute__((unused)) pa_stream *stream,
+ __attribute__((unused)) int success,
+ __attribute__((unused)) void *userdata) {
+ return;
+}
char *pipename = NULL;
int warned = 0;
-static void start(int sample_rate, int sample_format) {
+static void start(__attribute__((unused)) int sample_rate,
+ __attribute__((unused)) int sample_format) {
// this will leave fd as -1 if a reader hasn't been attached
fd = open(pipename, O_WRONLY | O_NONBLOCK);
if ((fd < -1) && (warned == 0)) {
static void help() { printf(" -d output-device set the output device [default*|...]\n"); }
static int init(int argc, char **argv) {
- int i, found, opt, round, rate, bufsz;
+ int found, opt, round, rate, bufsz;
+ unsigned int i;
const char *devname, *tmp;
// set up default values first
pthread_mutex_unlock(&sndio_mutex);
}
-static void start(int sample_rate, int sample_format) {
+static void start(__attribute__((unused)) int sample_rate,
+ __attribute__((unused)) int sample_format) {
pthread_mutex_lock(&sndio_mutex);
if (!sio_start(hdl))
die("sndio: unable to start");
pthread_mutex_unlock(&sndio_mutex);
}
-static void onmove_cb(void *arg, int delta) {
+static void onmove_cb(__attribute__((unused)) void *arg, int delta) {
time_of_last_onmove_cb = get_absolute_time_in_fp();
at_least_one_onmove_cb_seen = 1;
played += delta;
soundio_ring_buffer_advance_read_ptr(ring_buffer, read_count * outstream->bytes_per_frame);
}
-static void underflow_callback(struct SoundIoOutStream *outstream) {
+static void underflow_callback(__attribute__((unused)) struct SoundIoOutStream *outstream) {
static int count = 0;
debug(0, "underflow %d\n", ++count);
}
-static int init(int argc, char **argv) {
+static int init(__attribute__((unused)) int argc, __attribute__((unused)) char **argv) {
int err;
config.audio_backend_buffer_desired_length = 2.0;
static int fd = -1;
-static void start(int sample_rate, int sample_format) { fd = STDOUT_FILENO; }
+static void start(__attribute__((unused)) int sample_rate,
+ __attribute__((unused)) int sample_format) {
+ fd = STDOUT_FILENO;
+}
static void play(short buf[], int samples) {
char errorstring[1024];
// don't close stdout
}
-static int init(int argc, char **argv) {
+static int init(__attribute__((unused)) int argc, __attribute__((unused)) char **argv) {
// set up default values first
config.audio_backend_buffer_desired_length = 1.0;
config.audio_backend_latency_offset = 0;
// sync_error_out_of_bounds, sync_error);
sync_error_out_of_bounds = 0;
- size_t filler_length =
- config.resyncthreshold * config.output_rate; // number of samples
+ int filler_length = config.resyncthreshold * config.output_rate; // number of samples
if ((sync_error > 0) && (sync_error > filler_length)) {
// debug(1, "Large positive sync error: %lld.", sync_error);
frames_to_drop = sync_error / conn->output_sample_ratio;
} else if ((sync_error < 0) && ((-sync_error) > filler_length)) {
// debug(1, "Large negative sync error: %lld. Inserting silence.", sync_error);
- size_t silence_length = -sync_error;
+ int silence_length = -sync_error;
if (silence_length > (filler_length * 5))
silence_length = filler_length * 5;
break;
}
rr->data.AAAA.addr = malloc(sizeof(struct in6_addr));
- int i;
+ unsigned int i;
for (i = 0; i < sizeof(struct in6_addr); i++)
rr->data.AAAA.addr->s6_addr[i] = p[i];
p += sizeof(struct in6_addr);
// encodes a name (label) into a packet using the name compression scheme
// encoded names will be added to the compression list for subsequent use
-static size_t mdns_encode_name(uint8_t *pkt_buf, size_t pkt_len, size_t off, const uint8_t *name,
- struct name_comp *comp) {
+static size_t mdns_encode_name(uint8_t *pkt_buf, __attribute__((unused)) size_t pkt_len, size_t off,
+ const uint8_t *name, struct name_comp *comp) {
struct name_comp *c, *c_tail = NULL;
uint8_t *p = pkt_buf + off;
size_t len = 0;
size_t l;
struct rr_data_txt *txt_rec;
uint8_t *label;
- int i;
+ unsigned int i;
assert(off < pkt_len);
uint8_t *p = pkt_buf;
// uint8_t *e = pkt_buf + pkt_len;
size_t off;
- int i;
+ unsigned int i;
assert(answer != NULL);
assert(pkt_len >= 12);