Playing two or more WAV files simulatneously

Guest #2218364
Rate this post
useful
not useful
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) #2218442
Rate this post
useful
not useful
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 #2218470
Rate this post
useful
not useful
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 #2218549
Rate this post
useful
not useful
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 #2218647
Rate this post
useful
not useful
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) #2218664
Rate this post
useful
not useful
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

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now