MP3 decoder with cortex M3

OP (Company: Poulet) #1741709
Rate this post
• ▲ useful
▼ not useful
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,

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.