#include "input_i2s.h" | #include "input_i2s.h" | ||||
#include "output_i2s.h" | #include "output_i2s.h" | ||||
static uint32_t i2s_rx_buffer[AUDIO_BLOCK_SAMPLES]; | |||||
DMAMEM __attribute__((aligned(32))) static uint32_t i2s_rx_buffer[AUDIO_BLOCK_SAMPLES]; | |||||
audio_block_t * AudioInputI2S::block_left = NULL; | audio_block_t * AudioInputI2S::block_left = NULL; | ||||
audio_block_t * AudioInputI2S::block_right = NULL; | audio_block_t * AudioInputI2S::block_right = NULL; | ||||
uint16_t AudioInputI2S::block_offset = 0; | uint16_t AudioInputI2S::block_offset = 0; |
#include "input_i2s2.h" | #include "input_i2s2.h" | ||||
#include "output_i2s2.h" | #include "output_i2s2.h" | ||||
static uint32_t i2s2_rx_buffer[AUDIO_BLOCK_SAMPLES]; | |||||
DMAMEM __attribute__((aligned(32))) static uint32_t i2s2_rx_buffer[AUDIO_BLOCK_SAMPLES]; | |||||
audio_block_t * AudioInputI2S2::block_left = NULL; | audio_block_t * AudioInputI2S2::block_left = NULL; | ||||
audio_block_t * AudioInputI2S2::block_right = NULL; | audio_block_t * AudioInputI2S2::block_right = NULL; | ||||
uint16_t AudioInputI2S2::block_offset = 0; | uint16_t AudioInputI2S2::block_offset = 0; |
if (block_ch1) { | if (block_ch1) { | ||||
offset = block_offset; | offset = block_offset; | ||||
if (offset <= AUDIO_BLOCK_SAMPLES/2) { | if (offset <= AUDIO_BLOCK_SAMPLES/2) { | ||||
arm_dcache_delete(src, sizeof(i2s_rx_buffer) / 2); | |||||
arm_dcache_delete((void*)src, sizeof(i2s_rx_buffer) / 2); | |||||
block_offset = offset + AUDIO_BLOCK_SAMPLES/2; | block_offset = offset + AUDIO_BLOCK_SAMPLES/2; | ||||
dest1 = &(block_ch1->data[offset]); | dest1 = &(block_ch1->data[offset]); | ||||
dest2 = &(block_ch2->data[offset]); | dest2 = &(block_ch2->data[offset]); |
if (block_ch1) { | if (block_ch1) { | ||||
offset = block_offset; | offset = block_offset; | ||||
if (offset <= AUDIO_BLOCK_SAMPLES/2) { | if (offset <= AUDIO_BLOCK_SAMPLES/2) { | ||||
arm_dcache_delete(src, sizeof(i2s_rx_buffer) / 2); | |||||
arm_dcache_delete((void*)src, sizeof(i2s_rx_buffer) / 2); | |||||
block_offset = offset + AUDIO_BLOCK_SAMPLES/2; | block_offset = offset + AUDIO_BLOCK_SAMPLES/2; | ||||
dest1 = &(block_ch1->data[offset]); | dest1 = &(block_ch1->data[offset]); | ||||
dest2 = &(block_ch2->data[offset]); | dest2 = &(block_ch2->data[offset]); |