Reply by robert bristow-johnson September 21, 20052005-09-21
in article 1127319666.618206.294480@g49g2000cwa.googlegroups.com, Emmer at
emmer@esound.com.tw wrote on 09/21/2005 12:21:

> Hi Robert, > > I understand to keep the constant delay is an important problem for the > audio quality. > But in my case, I assume that if the computing power is enough, I can > get the acceptable audio quality. > > The problem which I need to solve is "Live resampling" problem. How to > do it fast and > guarantee an acceptable quality on telephone side. >
alright, so i am to presume that you have the hardware issue licked. correct? this means that you have an 8 kHz device that interrupts the computer and hands the computer a sample from the telephone 8 times every millisecond. when the computer is interrupted from this device, it "reads" a sample, puts it into a queue and outputs a sample to the telephone device from another queue and increments both input pointer and output pointer. then, inside the computer is an audio card that runs at 48 kHz INDEPENDENTLY (or "asynchronously"). that means it might not run at exactly 6 times the rate of the telephone device, correct? it might be a teeny bit slow or a little fast. then, about 48 times per ms this device interrupts the computer and the computer outputs a sample to (eventually) the loudspeaker and inputs a sample from the microphone. correct? if this all is correct, do you have all of the code you need to do all this inputting and outputting from circular buffers (i.e. "queues") in your computer, because i cannot help with that. if you do, we can talk about how each output buffer is defined from the input buffers (that is where the ASRC is), but if you do not have that housekeeping code going, there is no point to it. lemme know. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by Emmer September 21, 20052005-09-21
Hi Robert,

I understand to keep the constant delay is an important problem for the
audio quality.
But in my case, I assume that if the computing power is enough, I can
get the acceptable audio quality.

The problem which I need to solve is "Live resampling" problem. How to
do it fast and
guarantee an acceptable quality on telephone side.

Reply by robert bristow-johnson September 21, 20052005-09-21
in article 1127308501.845826.28370@g47g2000cwa.googlegroups.com, Emmer at
emmer@esound.com.tw wrote on 09/21/2005 09:15:

> Bad news, I think is asynchronous.
to be specific, your device has both an input clock that defines when the input samples come in *and* and output clock that defines when an output sample comes out, right? if that is the case, you have a control systems issue. you will have to slightly adjust the SRC ratio so as to keep the output pointer following the input pointer with a roughly constant delay. there are devices that do this sorta thing. maybe it would be easiest just to buy one. AD1890 and descendants. look up Bob Adams of Analog Devices for lit. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by Emmer September 21, 20052005-09-21
Bad news, I think is asynchronous.

Reply by Emmer September 21, 20052005-09-21
Hi Frisbie,

I use the libresample from
http://www-ccrma.stanford.edu/~jos/resample/Available_Software.html

Could you give me more information about the "trivial" algorithm?
Commercial component/library is ok.

Pls give me a hand...I really need to solve this problem.

Reply by robert bristow-johnson September 20, 20052005-09-20
in article 1127231993.214251.260690@g49g2000cwa.googlegroups.com, Emmer at
emmer@esound.com.tw wrote on 09/20/2005 11:59:

> I hope to do the audio sample rate convertion(resampling) between the > ISDN and my device. The ISDN audio sample rate is 8000, 16bits/sample, > Mono but my device use 48000, 16bits/sample, Mono.
are the input and output clocks synchronous or asynchronous? the former is much easier than the latter. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by Phil Frisbie, Jr. September 20, 20052005-09-20
Emmer wrote:

> Dear All, > > I hope to do the audio sample rate convertion(resampling) between the > ISDN and my device. The ISDN audio sample rate is 8000, 16bits/sample, > Mono but my device use 48000, 16bits/sample, Mono. > > I can do the resampling use some software library, but it is heavy > loading. I hope to handle 30 calls(E1) concurrently. But I can only > handle 2 calls on a P4 3.0 PC. > > Could you give me some suggestoin?
You are using the wrong algorithm then! Sample rate conversion is trivial, even if you need to filter before decimation. I would be surprised if it took more than 20 MIPS on a P4 to handle 30 streams! -- Phil Frisbie, Jr. Hawk Software http://www.hawksoft.com
Reply by Emmer September 20, 20052005-09-20
Dear All,

I hope to do the audio sample rate convertion(resampling) between the
ISDN and my device. The ISDN audio sample rate is 8000, 16bits/sample,
Mono but my device use 48000, 16bits/sample, Mono.

I can do the resampling use some software library, but it is heavy
loading. I hope to handle 30 calls(E1) concurrently. But I can only
handle 2 calls on a P4 3.0 PC.

Could you give me some suggestoin? Maybe I should use the DSP board to
do this. Do you know which DSP board can

1. PCI interface for PC
2. Provide API for C/C++
3. Can process multiple call concurrently
4. Acceptable voice quality
5. Cost

Thanks.