add sndio(7) support which is the only supported mixer backend on OpenBSD#470
add sndio(7) support which is the only supported mixer backend on OpenBSD#470
Conversation
| cdata.set('HAS_PULSEAUDIO', 1) | ||
| endif | ||
|
|
||
| if get_option('sndio') |
There was a problem hiding this comment.
Instead of making this feature optional, can you make it non-optional on OpenBSD please?
src/sndio.c
Outdated
| static void ondesc(void *unused, struct sioctl_desc *d, int val) { | ||
| struct control *i, **pi; | ||
|
|
||
| if (d == NULL) |
There was a problem hiding this comment.
Here and elsewhere, please add braces:
if (d == NULL) {
return;
}| #include "i3status.h" | ||
|
|
||
| struct control { | ||
| struct control *next; |
There was a problem hiding this comment.
Any reason not to use the include/queue.h macros for this list?
There was a problem hiding this comment.
i don't see the reason why for such simple code, but doable if you insist
There was a problem hiding this comment.
It’s not really about complexity, but rather uniformity and code re-use. No need to have multiple linked list implementations within the same project… :)
src/sndio.c
Outdated
| static void onval(void *unused, unsigned int addr, unsigned int value) { | ||
| struct control *c; | ||
|
|
||
| for (c = controls;; c = c->next) { |
There was a problem hiding this comment.
Why not for (c = controls; c != NULL; c = c->next) instead of the explicit if (c == NULL) { return } below?
This pull request adds sndio support to i3status. This is the only supported mixer backend
on OpenBSD so let's disable everything else.