DSPRelated.com
Forums

newbie question: separate a stereo sound into left and right channels

Started by wei li August 20, 2004
Dear List:

I have a question regarding AIC23 Codec on a C6713 board. I used the
following command trying to get a sample of sound input from line in:

Uint32 mySample;
DSK6713_AIC23_read(hCodec, &mySample);

which is successful. Then I try to use:

Uint16 leftChannel, rightChannel;
leftChannel = mySample & 0xFFFF0000;
rightChannel = mySample & 0x0000FFFF;

the resulting rightChannel gives the sterol sound while the leftChannel
gives nothing.

How can I separate the two channels? Thanks very much in advance.

Wei