From f0ed79e6b508aad3f681b0c756722d40647f5dda Mon Sep 17 00:00:00 2001 From: Sam Chesney Date: Fri, 27 Jan 2017 15:52:54 +0000 Subject: [PATCH] Move I2S US3 and DS3 counters from global space to deliver() --- module_usb_audio/audio_io/audio_io.xc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/module_usb_audio/audio_io/audio_io.xc b/module_usb_audio/audio_io/audio_io.xc index f803085a..8f2ebdbf 100755 --- a/module_usb_audio/audio_io/audio_io.xc +++ b/module_usb_audio/audio_io/audio_io.xc @@ -57,8 +57,6 @@ static unsigned samplesIn[2][MAX(NUM_USB_CHAN_IN, IN_CHAN_COUNT)]; #undef SPDIF_RX #endif -static int i2sInDownsamplingCounter = 0; -static int i2sOutUpsamplingCounter = 0; #if (I2S_DOWNSAMPLE_FACTOR_IN > 1) || (I2S_UPSAMPLE_FACTOR_OUT > 1) #include "src.h" #endif // (I2S_DOWNSAMPLE_FACTOR_IN > 1) || (I2S_UPSAMPLE_FACTOR_OUT > 1) @@ -505,6 +503,9 @@ unsigned static deliver(chanend c_out, chanend ?c_spd_out, } #endif +int i2sInDownsamplingCounter = 0; +int i2sOutUpsamplingCounter = 0; + #if (I2S_DOWNSAMPLE_FACTOR_IN > 1) union i2sInDs3 { @@ -539,8 +540,6 @@ unsigned static deliver(chanend c_out, chanend ?c_spd_out, return command; } - i2sInDownsamplingCounter = 0; - InitPorts(divide); /* Main Audio I/O loop */