From b6be6c14a41bd78b8eb6709ac7b9829c4d4f8a89 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Sun, 5 Jul 2020 23:43:26 -0700 Subject: [PATCH] Fix flipped argument order and update CNFA --- colorchord2/cnfa | 2 +- colorchord2/default.conf | 4 ++-- colorchord2/main.c | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/colorchord2/cnfa b/colorchord2/cnfa index f0f478f..aa931ed 160000 --- a/colorchord2/cnfa +++ b/colorchord2/cnfa @@ -1 +1 @@ -Subproject commit f0f478f619e5db0ef5b3cb5e7da2b7d5d6f317be +Subproject commit aa931ed2db1991381867a1722b0e6a7bac98f467 diff --git a/colorchord2/default.conf b/colorchord2/default.conf index 8956acf..7bb04e2 100644 --- a/colorchord2/default.conf +++ b/colorchord2/default.conf @@ -22,7 +22,7 @@ wininput = -1 #Compiled version will default to PULSE (or ALSA) on Linux, WASAPI (winmm) [or WIN for winmm] on Windows and ANDROID on Android # sound_source = ALSA -sound_source = WASAPI +# sound_source = WASAPI #-1 indicates left and right, 0 left, 1 right. sample_channel = -1 @@ -30,7 +30,7 @@ sample_channel = -1 devplay = default # Sets the device to get audio from, for WASAPI, "default" searches for a mic, and "defaultRender" searches for your loopback. # devrecord = default -devrecord = default + #Render # For Linux mostly use the following command to find valid devices to read from: diff --git a/colorchord2/main.c b/colorchord2/main.c index daba5dd..baaa97f 100644 --- a/colorchord2/main.c +++ b/colorchord2/main.c @@ -233,7 +233,7 @@ void HandleMotion( int x, int y, int mask ) { } -void SoundCB( struct CNFADriver * sd, short * in, short * out, int framesr, int framesp ) +void SoundCB( struct CNFADriver * sd, short * out, short * in, int framesp, int framesr ) { int channelin = sd->channelsRec; int channelout = sd->channelsPlay; @@ -265,7 +265,6 @@ void SoundCB( struct CNFADriver * sd, short * in, short * out, int framesr, int // printf( "Sound fault A %d/%d %d/%d %f\n", j, channelin, i, samplesr, f ); } } - fo /= channelin; sound[soundhead] = fo*in_amplitude; soundhead = (soundhead+1)%SOUNDCBSIZE;