soundappraisal / libsoundannotator

Other
0 stars 0 forks source link

[streamboard] Why does PTNProcessor.publish always increment chunk number? #4

Closed arryon closed 7 years ago

arryon commented 7 years ago

In https://github.com/soundappraisal/libsoundannotator/blob/21625ef508035abf8d5fc2db6de676ffe37c9bc0/libsoundannotator/cpsp/PTN_Processor.py#L242 , the chunk number is incremented each time the publish function is called, even though the data might be None.

How does this influence continuity when noofblocks is zero, and None is published? When eventually noofblocks > 0, and data is published, the chunk number will have incremented and my guess is that the continuity will be discontinuous.

Can you please elaborate?

RonaldAJ commented 7 years ago

If no data is published the chunk number should not be incremented. This is a coding error which probably didn't affect our earlier useCases because where the PTN_Processor was used generally data would not be None.

Please note that the PTN_Processor output cannot be merged with earlier representationsas there is a discrepancy in temporal resolution of the representations. It was a design choice to put this responsibility with the library user.

RonaldAJ commented 7 years ago

Problem is reproducable with USeCase_ProcessingFiles.py from the demo. Setting blockwidth to 0.5 leads to production of many HDf files where two should be expected. This an example of blockwidth larger than chunkSize.