Loop Playback, ideas?

Guys, I'm working on a small project for a friend, and I'm wondering if I could use an Arduino for that. :wink:

The idea is to play Looped WAV or MP3 files, stereo and 16 bits 44.1 Khz from a SD card

So, I know that there are codecs that could handle it, BUT, since I need to re-start the MP3 file once it reaches the end, and it can't have gaps, I don't know if I could get by with a codec.

Here's one I like: http://www.ebay.com/itm/251047147504?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649

Here's the SD interface: http://www.ebay.com/itm/140717254516?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649

I haven't received those yet, so I can't start testing just yet.

I don't mind using the SD Card in RAW mode (no FAT) so its faster to handle things out.

What I need to know is this: if I send the MP3 stream to the codec, can I know exactly where the stream is playing? Is the latency introduced by the coded static or depends on what's playing?

I will share the project's code once I have something to show. :wink:

Thanks for any help.

The ideal situation is to have 4 channels playing, and this can be loaded from a single file, so its always a continuous read from the SD Card, not random. EG: byte1_byte2_byte3_byte4 = left_right_left2_right2 and maybe lower sample-rate.

I'm also going to test a 12 bit SPI DAC and even a 9 bit PWM DAC, just in case. The only problem is that the SD Card stream will be much heavier with pure raw sound, compared to a MP3 stream.

I'm also considering using the Arduino for the interface and another chip for the audio, maybe a XMOS or NXP chip. I posted about this on this other forum.

http://www.xcore.com/forum/viewtopic.php?f=3&t=1803

The problem with those other chips is the PCB assembly, which will require special tools I don't have. :wink: