0 Replies Latest reply: May 17, 2013 12:33 AM by 908881 RSS

    Problem in jmf voice capture

    908881
      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 com.sun.media.protocol)
      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 = super.read(this.data, 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 ?