I have implemented an MP3 decoder based on helix decoder on a LM3S9B96 microcontroller and I want to play the PCM sample (WAV) decoding through the audio codec.This board has one cortex M3 core.For play the song in the board I use the codec TLV320AIC23 of the board .I transfer the sample to the codec via i2s link by using one DMA controller.But I have one limitation with the DMA transfer , the maximum transfer I can make is 1024 items to tranfered , but the size of the PCM output array (MP3 decoder output) is 2304 so he has 2304 short elements (that means 1152*2 =2304).I must to transfer steaming MP3, and I want to used ping pong mode for this, but I can't used ping pong mode buffer to transfer 1152 items, so I have implement one solution that transfer 576 items in primary buffer and 576 items in alternate buffer of the DMA controller.I use 4 buffeurs instead 2 (for transfer 4*576 items=2304).I have 2 primary buffeur and 2 alternate buffer.When the first primary transfer has done I do the first alternate transfer and so on, beacause I can't fill primary buffer when he is done he has only 1152 size and my PCM output has 2304.I refill primary and alternate buffer of the DMA controller with MP3 decoder , so I refill primary and alternate at the same time when the second primary buffer is done. But during the sound play I have some noise in the song and the song is too slow than original, it's like I lose some sample in the process. Is anyone have one idea for help Me??I hope you've understand my context. Thank you in advance, and I hope someone will help me,
Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
Log in with Google account
No account? Register here.