Is it posible to invert one channel data output in USB audio software?


Is it posible to invert one channel data output in USB audio software?

Yes; there are lots of places you can do this in the data path but you could do it close to the pin. In /sc_usb_audio/module_usb_audio/audio.xc find the deliver function and look for:

            for(int i = 0; i < NUM_USB_CHAN_OUT; i++)        
            {
              int tmp = inuint(c_out);
              samplesOut[i] = tmp;
            }

This is where I2S gets the sample from the decouple core over a channel. In stereo, NUM_USB_CHAN_OUT = 2 so you can pick your channel and insert

            samplesOut[0] = - samplesOut[0];

after the loop.