Multiplying DAC-Values with Factor


I´m using the ADSP-SC584 with the respective Evaluation-Board and Cross Core 2.8.3.

I use the ADC-DAC-Playack Example for SHARC ADSP-SC589.

I configured this Project that the ADC reads a Signal from a Function-Generator into the ADC-Buffer. Then I copy the ADC-Buffer to DAC-Buffer and measure the output with an Osciloscope.

This works fine but when I try to scale the values with a factor (for example multiplying with 2) the Signal become 4 times higher rather than the expected 2 times.

for scaling the DAC-Values I do the following:

uint32_t* pointer4bytes;


pointer4bytes = (uint32_t*) &DacBuf[0];    // DacBuf is a uint8_t Array

for(i=0; i<(   AUDIO_BUFFER_SIZE  / (  NUM_CHANNELS  *  SAMPLE_SIZE ) ) ; i++)     // NUM_CHANNELS = 4 && SAMPLE_SIZE = 4       

{                                                                                                                                          // AUDIO_BUFFER_SIZE = X * SAMPLE_PER_PERIOD * NUM_CHANNELS * SAMPLE_SIZE

           *(pointer4bytes + i * NUM_CHANNELS) *= 2;      // I scale the values



this is the same technique like in the function Generate_Sinus_Wave.

I dont know where my mistake is.

PS. I heared about saturation arithmetic and not sure how to aquire this. I have read that I have to set the SATURATIONBIT of the ALU but I´m not sure how to do this