forked from PAWPAW-Mirror/lib_xua
Moved I2S_UPSAMPLE_FACTOR_OUT default to devicedefines.h from the
top of audio_io.xc.
This commit is contained in:
@@ -57,10 +57,6 @@ static unsigned samplesIn[2][MAX(NUM_USB_CHAN_IN, IN_CHAN_COUNT)];
|
|||||||
#undef SPDIF_RX
|
#undef SPDIF_RX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef I2S_UPSAMPLE_FACTOR_OUT
|
|
||||||
#define I2S_UPSAMPLE_FACTOR_OUT (1)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int inDownsamplingCounter = 0;
|
static int inDownsamplingCounter = 0;
|
||||||
static int outUpsamplingCounter = 0;
|
static int outUpsamplingCounter = 0;
|
||||||
#if (I2S_DOWNSAMPLE_FACTOR_IN > 1) || (I2S_UPSAMPLE_FACTOR_OUT > 1)
|
#if (I2S_DOWNSAMPLE_FACTOR_IN > 1) || (I2S_UPSAMPLE_FACTOR_OUT > 1)
|
||||||
|
|||||||
@@ -134,6 +134,19 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Outgoing I2S (host to device) channels can be upsampled by a factor of 3.
|
||||||
|
*
|
||||||
|
* Default: 1 i.e. upsampling is disabled.
|
||||||
|
*/
|
||||||
|
#ifndef I2S_UPSAMPLE_FACTOR_OUT
|
||||||
|
#define I2S_UPSAMPLE_FACTOR_OUT (1)
|
||||||
|
#else
|
||||||
|
#if (I2S_UPSAMPLE_FACTOR_OUT != 3) && (I2S_UPSAMPLE_FACTOR_OUT != 1)
|
||||||
|
#error Unsupported I2S input upsampling configuration
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Only downsample one channel per input I2S frame.
|
* @brief Only downsample one channel per input I2S frame.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user