From df06ca12d724244d924040ef1d640a67cf68c261 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Mon, 18 May 2020 14:05:24 -0700 Subject: [PATCH] Bump to new CNFA subsystem --- colorchord2/cnfa | 2 +- colorchord2/main.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/colorchord2/cnfa b/colorchord2/cnfa index 6c9dd09..8fed9b6 160000 --- a/colorchord2/cnfa +++ b/colorchord2/cnfa @@ -1 +1 @@ -Subproject commit 6c9dd0901ba034577dea72f86756f3ac2f748862 +Subproject commit 8fed9b680a217afabd0d9ce4b459499d370a0719 diff --git a/colorchord2/main.c b/colorchord2/main.c index b80d5e9..a5ed20d 100644 --- a/colorchord2/main.c +++ b/colorchord2/main.c @@ -227,7 +227,7 @@ void HandleMotion( int x, int y, int mask ) { } -void SoundCB( struct CNFADriver * sd, short * in, short * out, int samplesr, int samplesp ) +void SoundCB( struct CNFADriver * sd, short * in, short * out, int framesr, int framesp ) { int channelin = sd->channelsRec; int channelout = sd->channelsPlay; @@ -241,7 +241,7 @@ void SoundCB( struct CNFADriver * sd, short * in, short * out, int samplesr, int if( in ) { - for( i = 0; i < samplesr; i++ ) + for( i = 0; i < framesr; i++ ) { if( sample_channel < 0 ) { @@ -280,17 +280,17 @@ void SoundCB( struct CNFADriver * sd, short * in, short * out, int samplesr, int } } - SoundEventHappened( samplesr, in, 0, channelin ); + SoundEventHappened( framesr, in, 0, channelin ); } if( out ) { - for( j = 0; j < samplesp * channelout; j++ ) + for( j = 0; j < framesp * channelout; j++ ) { out[j] = 0; } - SoundEventHappened( samplesp, out, 1, channelout ); + SoundEventHappened( framesp, out, 1, channelout ); } @@ -407,7 +407,7 @@ int main(int argc, char ** argv) //Initialize Sound sd = CNFAInit( sound_source, "colorchord", &SoundCB, GetParameterI( "samplerate", 44100 ), GetParameterI( "channels", 2 ), GetParameterI( "channels", 2 ), GetParameterI( "buffer", 1024 ), - GetParameterS( "devrecord", 0 ), GetParameterS( "devplay", 0 ) ); + GetParameterS( "devrecord", 0 ), GetParameterS( "devplay", 0 ), 0 ); if( sd ) break;