2

I use Xuggler and the DecodeAndPlayVideo demo, and it works great.

Now I would like retrieve each sample from each channel audio to do another process after.

I would Like a solution like this (or other):

IAudioSample channelRight 
IAudioSample channelLeft

I tryed with this code, but doesn't work well :

//aSample is the main IAudioSamples (Stereo )

byte[] leftChanelByte = new byte[1024];
for (int i = 0; i < leftChanelByte.length ; i++) {

    leftChanelByte[i]= (byte)aSamples.getSample(i, 1, aSamples.getFormat());
}

Have you any idea to do this? Thanks

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
warn974
  • 80
  • 7

0 Answers0