0
0

Okay, this going to sound like a stupid question, but what do the values you receive in a DSP buffer actually represent. I have read that it is the raw pcm data ( or similar ) , but still I am none the wiser. The reason I ask is because I am trying to add a slight echo (say from 5 samples ago) by combining the two, as in:

[code:nbb5q6ni]

position = (length* 2) -1 – ECHO;
float p;

for(i = (length*2)-1; i >= 0 ;i–)
{
if(position >= 0)
{
p= src[i] + (src[position] / 2.0);
val = (signed short) p ;
if(val > 32767){val = 32767;}
if(val < -32768){val = -32768;}
src[i] = val;
}
position–;
}

[/code:nbb5q6ni]

This is a DSP attached to a stream and uses a pocket PC.
The problem I am getting is that crackling is created and distorted noise (especially with low frequency sounds) and I cant work out how to get rid of it. I get the same problem if I try and take the average of the 2 samples. So 2 questions I guess, what is the format of DSP data and what am I doing wrong in the code above!!!

cheers, tony

  • You must to post comments
0
0

Can anyone help me with this?

  • You must to post comments
0
0

One thing I see wrong is that, you are doing “length* 2” it should be “length / 2”

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.