void AudioOutputPT8211::isr(void) | void AudioOutputPT8211::isr(void) | ||||
{ | { | ||||
int16_t *dest; | |||||
int16_t *dest, *dest_copy; | |||||
audio_block_t *blockL, *blockR; | audio_block_t *blockL, *blockR; | ||||
uint32_t saddr, offsetL, offsetR; | uint32_t saddr, offsetL, offsetR; | ||||
// so we must fill the first half | // so we must fill the first half | ||||
dest = (int16_t *)i2s_tx_buffer; | dest = (int16_t *)i2s_tx_buffer; | ||||
} | } | ||||
dest_copy = dest; | |||||
blockL = AudioOutputPT8211::block_left_1st; | blockL = AudioOutputPT8211::block_left_1st; | ||||
blockR = AudioOutputPT8211::block_right_1st; | blockR = AudioOutputPT8211::block_right_1st; | ||||
return; | return; | ||||
} | } | ||||
arm_dcache_flush_delete(dest_copy, sizeof(i2s_tx_buffer) / 2); | |||||
if (offsetL < AUDIO_BLOCK_SAMPLES) { | if (offsetL < AUDIO_BLOCK_SAMPLES) { | ||||
AudioOutputPT8211::block_left_offset = offsetL; | AudioOutputPT8211::block_left_offset = offsetL; | ||||
} else { | } else { |
void AudioOutputPT8211_2::isr(void) | void AudioOutputPT8211_2::isr(void) | ||||
{ | { | ||||
int16_t *dest; | |||||
int16_t *dest, *dest_copy; | |||||
audio_block_t *blockL, *blockR; | audio_block_t *blockL, *blockR; | ||||
uint32_t saddr, offsetL, offsetR; | uint32_t saddr, offsetL, offsetR; | ||||
// so we must fill the first half | // so we must fill the first half | ||||
dest = (int16_t *)i2s_tx_buffer; | dest = (int16_t *)i2s_tx_buffer; | ||||
} | } | ||||
dest_copy = dest; | |||||
blockL = AudioOutputPT8211_2::block_left_1st; | blockL = AudioOutputPT8211_2::block_left_1st; | ||||
blockR = AudioOutputPT8211_2::block_right_1st; | blockR = AudioOutputPT8211_2::block_right_1st; | ||||
return; | return; | ||||
} | } | ||||
arm_dcache_flush_delete(dest_copy, sizeof(i2s_tx_buffer) / 2); | |||||
if (offsetL < AUDIO_BLOCK_SAMPLES) { | if (offsetL < AUDIO_BLOCK_SAMPLES) { | ||||
AudioOutputPT8211_2::block_left_offset = offsetL; | AudioOutputPT8211_2::block_left_offset = offsetL; | ||||
} else { | } else { |