Hi,
I'm trying dsb-sc modulation using ezdsp-c5505.
I have configured AIC3204 to sample at 192Khz.
I use a DMA ping pong buffer of 192 samples.
So I have 1000 array samples per second in input and output.
I'd like to modulate my input signal (a sinusoid) at 32768 Hz.
By replying USB stick Audio filter example, and using only left channel of the codec,
i have done:
w_32 = 2*PI*32768/192000;
...
in main:
while(1) { if (CurrentRxL_DMAChannel ==2) { buff_copy(RcvL1,Buffer,192); dsbsc(Buffer,FilterOutL1); } else { buff_copy(RcvL2,Buffer2,192); dsbsc(Buffer2,FilterOutL2); } }
...
dsbsc function:
void dsbsc(Int16 *input, Int16* output){ float w = 0; Uint16 i = 0; for(i = 0; i < 192 ; i++){ *(output + i) = *(input + i)*cosf(phase_mod); phase_mod += w_32; } }
the problem is that when i want to modulate a 1KHz signal, there is no problem, but for different frequencies i have some glitches in the modulated waveform.
Any tip?
Thanks in Advance