Playing two or more WAV files simulatneously

Guest
Ok, sounds easy. As long as you decide to play back 8 bit sounds with 8 
khz sampling frequency. :)
Guest
Your problem will be the data transfer rate of the sd-card. With the 
libs from elm chan you will get maybe 300 kb /sec. As long as you read 
only one file, and have big buffers (sector size) on the mc. So reading 
16 files simultaneously from one sd-card doesn't work! Believe me.

What to do?
-multiple sd-card / flash drives
-avoid overhead / fragmentation from fat -> create your one stream file 
system.

A little calculation what the transfer rate should reach:

16 bit, 32 mono channels (16 stereo channels) * 44100 khz
bit depth  channels  sampling frequency
=22.579.200 = ca. 22 Mb / sec :)
OP (Company: BARAN)
Thanks for the answers.

It will be 48 Khz, 16 bits. Audio stream has no compression.

SD or flash storage is not a problem. I have difficulties in audio 
electronic part.

Thanks
Ersin
OP (Company: BARAN)
My problem is mainly mixing two or more audio streams.

I will have one microprocessor and an FPGA available on the board.

I will mix the audio streams either digitally in the FPGA or by using 
multi ADCs and an analog circuit to mix them. In either way I don't know 
exactly how to do it.
Guest
With an fpga, that is another challenge: You need to setup a microblaze 
core or something to controll all that stuff. Then access the sd-card / 
flash drives from that core. Big tasks!


Digital mixing algo. for unsigned 16 bit values:

A + B – A·B / 65536
Guest
16 dacs, forget about it - or find somebody who route this beast for 
you... Mixing analog signals is very easy. Just use an op, insert an 
adjustable resistor in the feedback loop to control sum gain. Each 
channel needs an poti to to controll the channel volume like here:

http://yusynth.net/Modular/EN/MIXER/Mixer-1U.html

It is build on a breadboard in minutes...


greetz jonas
Guest
With the dacs, do you plan using some of the "new" DACs more or less 
with an codec used and clock frequence = fs * 256 or some of the old 16 
bitters....?
OP (Company: BARAN)
Jonas, thank you very much for the analog circuit. It helped me a lot.

I think I have to use 16 DACs since I have 16 digital audio streams. Is 
this correct? But I didn't decide yet which DAC to use.
Guest
No thanks! I like to help. :)

>I think I have to use 16 DACs since I have 16 digital audio streams. Is
>this correct? But I didn't decide yet which DAC to use.

This is correct. As long as you don't use a dac with multiple channels.
But let us go ahead (we assume to use an easy to handle one like this 
Rohm BU9480F, here the link: 
http://elm-chan.org/works/pcmp/report.html):

You need to avoid (oh it is really challenging me to explain this in 
english)
bad ground loops in your circuit, and that is not all...
I think you need to read a few hints to designing a good dac layout with 
16 dacs. Maybe you are lucky and some of the masters reign this forum 
can give you some more information. I stay on...
OP (Company: BARAN)
What about this chip from TI:
http://focus.ti.com/docs/prod/folders/print/pcm1602a.html
It has 6 DACs. I have to use 3 parallel to achive 16 channels.

Actually I am an experienced PCB and hardware designer. The problem is 
that this is my first audio project. I developed mostly industrial 
control electronics.

I will investigate more on filtering and routing audio signals.

Thanks a lot.

Reply

A question of your own? This thread is over 15 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

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.