This discussion is archived
0 Replies Latest reply: May 16, 2013 10:33 PM by 908881 RSS

Problem in jmf voice capture

908881 Newbie
Currently Being Moderated
I have made my custom DataSource, custom DirectSoundStream, custom DSoundST class for voice capture.
Capture Format:
Encoding: Linear
Sample Rate: 8000
Sample Size: 16
Channel: 1

capture buff size: 320

Read method in custom DSoundST class which calls native read method of DSound class (in package
has variable delay in reading capture voice from microphone.

The following code sample in DSoundST class gives variable delay(of 60,42,0,145,211 ms) in read method

long t = System.currentTimeMillis();
this.result =, this.offset, this.len);
System.err.println("# DSoundSTRead "+this.len+" "+this.result+" "+(System.currentTimeMillis()-t));

Why there is variable delay in the above read() method. How to remove this delay, how to have constant delay ?


  • Correct Answers - 10 points
  • Helpful Answers - 5 points