Skip to content

Commit 48cfc43

Browse files
committed
Cope with slow analysis of waveforms on CDJ-3000s
1 parent b4a543a commit 48cfc43

File tree

4 files changed

+159
-26
lines changed

4 files changed

+159
-26
lines changed

src/main/java/org/deepsymmetry/beatlink/data/TrackMetadata.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ public class TrackMetadata {
3939
@API(status = API.Status.STABLE)
4040
public final CdjStatus.TrackType trackType;
4141

42+
/**
43+
* Tracks when this metadata was created, which can be used to know how long a finder should wait
44+
* for a track to be analyzed by a CDJ-3000 before giving up on obtaining other metadata for it.
45+
*/
46+
@API(status = API.Status.EXPERIMENTAL)
47+
public final long timestamp = System.nanoTime();
48+
4249
/**
4350
* The raw dbserver messages containing the metadata when it was read over the network.
4451
* Can be used to analyze fields that have not yet been reliably understood,

src/main/java/org/deepsymmetry/beatlink/data/WaveformDetail.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,14 @@ public Color segmentColor(final int segment, final int scale) {
449449
}
450450

451451

452+
@Override
453+
public boolean equals(Object obj) {
454+
if (!(obj instanceof WaveformDetail)) {
455+
return false;
456+
}
457+
final WaveformDetail other = (WaveformDetail) obj;
458+
return getData().equals(other.getData());
459+
}
452460

453461
@Override
454462
public String toString() {

0 commit comments

Comments
 (0)