private SourceDataLine getJavaSoundLine(IStream stream)
{
IStreamCoder audioCoder = stream.getStreamCoder();
int streamIndex = stream.getIndex();
SourceDataLine line = mAudioLines.get(streamIndex);
if (line == null)
{
try
{
// estabish the audio format, NOTE: xuggler defaults to signed 16 bit
// samples
AudioFormat audioFormat = new AudioFormat(audioCoder.getSampleRate(),
(int) IAudioSamples
.findSampleBitDepth(audioCoder.getSampleFormat()), audioCoder
.getChannels(), true, false);
// create the audio line out
DataLine.Info info = new DataLine.Info(SourceDataLine.class,
audioFormat);
line = (SourceDataLine) AudioSystem.getLine(info);
// open the line and start the line
line.open(audioFormat);
line.start();
mAudioLines.put(streamIndex, line);
// if mDataLine is not yet defined, do so
if (null == mDataLine)