static const pa_buffer_attr buffer_attr = {
.maxlength = SAMPLE_HZ * sizeof(float) * NSTREAMS,
.tlength = (uint32_t) -1,
- .prebuf = 0, /* Setting prebuf to 0 guarantees us the the streams will run synchronously, no matter what */
+ .prebuf = 0, /* Setting prebuf to 0 guarantees us the streams will run synchronously, no matter what */
.minreq = (uint32_t) -1,
.fragsize = 0
};
memset(silence, 0, sizeof(silence));
while (nbytes) {
- int n = MIN(sizeof(silence), nbytes);
+ int n = PA_MIN(sizeof(silence), nbytes);
pa_stream_write(stream, silence, n, NULL, 0, 0);
nbytes -= n;
}
for (i = 0; i < NTESTS; i++) {
connect(argv[0], &i);
- usleep(random() % 500000);
+ usleep(rand() % 500000);
disconnect();
- usleep(random() % 500000);
+ usleep(rand() % 500000);
}
fprintf(stderr, "Done.\n");