AnsweredAssumed Answered

ADSP-21364 BlockBasedTalkThru-problem with distinguish Left and Right channel

Question asked by makary87 on Jan 13, 2011
Latest reply on Jan 21, 2011 by makary87

Hello,

 

I've just started my work with ADSP - 21364. And I have huge problem with getting form data_block samples for Left and Right channel. I am trying to do this by using Block Based TalkThru example from  VisualDSP++ 5.0 Update 8 v.5.0.8.0.

 

When I'm trying to mute samples from one channel, it is not working. I hear something not nice and this sound contain some 'part' of input signal.

 

In one of the topic( http://ez.analog.com/message/17473 ) I found that can be connected with order of the buffer in src_pointer array but for me everything is ok. It looks like this:

 

unsigned int *src_pointer[3] = {Block_A,

                                Block_C,

                                Block_B};

Below is my code:

 

void processBlock(unsigned int *block_ptr)
{
    int i;
    float temp_out;
    //Clear the Block Ready Semaphore
    blockReady = 0;
   
    //Set the Processing Active Semaphore before starting processing
    isProcessing = 1;
    for(i=0;i<NUM_SAMPLES/2;i++)               //Numer of samples dividing by 2
    {
     
    //samples from first channel
      sample = (float)(int)((*(block_ptr+i)) << 8);  
      
        sample = 0;               //mutting
       
        *(block_ptr+i) =  (unsigned)(((int)sample) >> 8);
   
     //samples from second channel 
          i= i+1; // incrementing
  
         sample = (float)(int)((*(block_ptr+i)) << 8); 
      
        sample = sample;
       
        *(block_ptr+i) =  (unsigned)(((int)sample) >> 8);
    
    }
    //Clear the Processing Active Semaphore after processing is complete
    isProcessing = 0;
}

 

What's wrong with it? Any idea?

 

Best regards,

 

Michal

Outcomes