ncmixer

ncurses audio mixer for DJ'ing
git clone git://git.2f30.org/ncmixer
Log | Files | Refs | README | LICENSE

commit 7c51d55a9a05128e9bd50a9236bd9b8e3528dbd2
parent 229451d13605c2f6726e618de325b89523904d9d
Author: sin <sin@2f30.org>
Date:   Mon,  6 Jun 2016 17:20:41 +0100

Add some comments

Diffstat:
Mncmixer.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/ncmixer.c b/ncmixer.c @@ -415,6 +415,7 @@ loop(void) printerr(1, "accept"); continue; } + /* input already connnected, reject this one */ if (in->clifd != -1) { close(clifd); continue; @@ -432,6 +433,7 @@ loop(void) continue; if (pfd[in->clifd].revents & (POLLIN | POLLHUP)) { if (consume(in) == -1) { + /* we lost the output, reset state */ pfd[in->clifd].fd = -1; pfd[in->clifd].events = 0; close(in->clifd); @@ -443,11 +445,13 @@ loop(void) /* play dat shit! */ for (i = 0; i < LEN(outputs); i++) { out = &outputs[i]; + /* open output device on demand */ if (out->sio_hdl == NULL) { out->sio_hdl = audio_open(out->name); if (out->sio_hdl == NULL) continue; } + /* attenuate inputs based on cross-fader position */ if (xfpos <= 0) { attenuate(&inputs[0], 1.0); attenuate(&inputs[1], 1.0 - abs(xfpos));