Hello!
I use K10 to playback wav file togerther with record micphone via dma to carry sound data. there is periodic ‘click’ noise,and playback speed is faster.
K10 is i2s master, 48KHz/16bit, MCLK is 12.288MHz,BCLK=1.536MHz
I debug the code ,and when i remove micphone record function code,only playback running,then there is not 'click' noise,and playback speed is normal.
Playback and record use dma channel0 and channel1, channel0 can preempt channel1, the interrupt priority of channel0 is higher than channel1.
I use PE and the API I2S0_SendBlock & I2S0_ReceiveBlock to playback & record sound data.
Thank you!
////////////////////////////////////////////////////////////////////////////////
Solved! Go to Solution.
I have resolved this question.
The key reason is : when i use API I2S0_ReceiveBlock to record sound data,in the interrupt routine I2S0_OnBlockReceived ,i copy playback data FIFO repeatedly,so playback speed is faster twice than normal
I have resolved this question.
The key reason is : when i use API I2S0_ReceiveBlock to record sound data,in the interrupt routine I2S0_OnBlockReceived ,i copy playback data FIFO repeatedly,so playback speed is faster twice than normal