#306 DoubleData.collectTime in RealTime processing

next release
accepted
None
1
2013-05-04
2013-04-22
Primetalk
No

Dear Nickolay.

I've recently found a modification of DoubleData (of Nov.08, 2012, rev.11643) that creates some obstacles for real-time processing of audio data. There is a property CollectTime that "@returns the difference, in milliseconds, between the time the audio data is collected and midnight, January 1, 1970" as the getter's documentation says. However, after that fall revision this is not true anymore. It's value cannot be set in a constructor and it represents only model time (or "within stream time" as we call it). We really miss property that reflects real time. We have used this property to monitor real time latencies along the audio data processing and to construct signals with the real-time marks along the way.

Could you please either add a constructor with the collectTime argument or add another property with the real-time semantics?

P.S. I've attached the patch with an alternative constructor for convenience.

1 Attachments

Discussion

  • Hi

    Why can't you use firstSampleNumber for the absolute time instead of collectTime? The main reason behind change was to remove redundant field.

     
  • Primetalk
    Primetalk
    2013-04-22

    Hi

    We deal with non stationary audio data flow (that is subject to jitter and packet losses, at least). And the processing of each frame may take different amount of time (we run the recognizer on the same thread as the frontend pipeline).

    On the other hand, "within stream time" (the one that is proportional to firstSampleNumber and is calculated the same way as the new version of collectTime), is used to communicate data losses through the pipeline.

    So we use both times (real time and model time) simultaneously.

     
  • I applied your patch, thanks a lot for report

     
    • status: open --> accepted
     
  • Primetalk
    Primetalk
    2013-04-25

    Thank you very much.

     
  • Primetalk
    Primetalk
    2013-04-25

    Dear Nickolay.

    I'm terribly sorry, but I've just found that FloatData also suffer with the same problem.

    Wouldn't it be too onerous to apply one more patch?

    Thanks in advance.

     
  • Done