From b19d75283219351cf10304db918c2de3b6e3468a Mon Sep 17 00:00:00 2001 From: Rainer Hurling Date: Fri, 13 Nov 2020 12:19:40 +0000 Subject: audio/cava: Update to 0.7.3 Update from 0.7.1 to 0.7.3 brings several improvements and bug fixes[1][2]. More important ones are: - Fix install on macos - ncurses mode is now default again - Improved portaudio audio input - Added Hann windowing and proper ring buffer [1] https://github.com/karlstav/cava/releases/tag/0.7.3 [2] https://github.com/karlstav/cava/releases/tag/0.7.2 PR: 250862 Submitted by: Adam Jimerson (takes maintainership) Approved by: arrowd (mentor) Differential Revision: https://reviews.freebsd.org/D27091 --- audio/cava/files/patch-input_sndio.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'audio/cava/files/patch-input_sndio.c') diff --git a/audio/cava/files/patch-input_sndio.c b/audio/cava/files/patch-input_sndio.c index 2e0d49c01f4f..38737e10450e 100644 --- a/audio/cava/files/patch-input_sndio.c +++ b/audio/cava/files/patch-input_sndio.c @@ -1,15 +1,8 @@ Stop using uninitialized variable after lazy refactoring upstream ---- input/sndio.c.orig 2020-05-29 23:20:44 UTC +--- input/sndio.c.orig 2020-10-29 12:44:33 UTC +++ input/sndio.c -@@ -8,14 +8,13 @@ void *input_sndio(void *data) { - struct sio_par par; - struct sio_hdl *hdl; - int16_t buf[256]; -- unsigned int channels; - - sio_initpar(&par); - par.sig = 1; +@@ -14,7 +14,7 @@ void *input_sndio(void *data) { par.bits = 16; par.le = 1; par.rate = 44100; @@ -18,11 +11,11 @@ Stop using uninitialized variable after lazy refactoring upstream par.appbufsz = sizeof(buf) / par.rchan; if ((hdl = sio_open(audio->source, SIO_REC, 0)) == NULL) { -@@ -34,7 +33,7 @@ void *input_sndio(void *data) { +@@ -33,7 +33,7 @@ void *input_sndio(void *data) { exit(EXIT_FAILURE); } -- uint16_t frames = (sizeof(buf) / sizeof(buf[0])) / channels; +- uint16_t frames = (sizeof(buf) / sizeof(buf[0])) / 2; + uint16_t frames = (sizeof(buf) / sizeof(buf[0])) / audio->channels; while (audio->terminate != 1) { if (sio_read(hdl, buf, sizeof(buf)) == 0) { -- cgit v1.2.3