Skip to content

Commit

Permalink
Merge pull request #78 from cprepos/cprepos-fix-todos-opus
Browse files Browse the repository at this point in the history
Cprepos fix todos opus
  • Loading branch information
brunchboy authored Jun 13, 2024
2 parents 33e4749 + 45826c9 commit 4536126
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
17 changes: 12 additions & 5 deletions src/main/java/org/deepsymmetry/beatlink/VirtualRekordbox.java
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,8 @@ private DeviceUpdate buildUpdate(DatagramPacket packet) {
final int player = Util.translateOpusPlayerNumbers(data[0x21]);
playerSongStructures.put(player, pssiFromOpus);
// Also record the conceptual source slot that represents the USB slot from which this track seems to have been loaded
// TODO we need to check that the track was loaded from a player, and not rekordbox, as well, before trying to do this!
final int sourceSlot = OpusProvider.getInstance().findMatchingUsbSlotForTrack(rekordboxId, player, pssiFromOpus);
if (sourceSlot != 0) { // We found match, record it.
if (sourceSlot != 0) { // We found a match, record it.
playerTrackSourceSlots.put(player, SlotReference.getSlotReference(sourceSlot, USB_SLOT));
}
}
Expand Down Expand Up @@ -503,8 +502,12 @@ public List<NetworkInterface> getMatchingInterfaces() {
return Collections.unmodifiableList(matchingInterfaces);
}


// TODO JavaDoc needed
/**
* This will send the announcement that makes players think that they are talking to rekordbox.
* After we send these announcement packets other players will start to send out status packets.
* We need to send these every second or two otherwise we will be disconnected from the Pro DJ Link
* network.
*/
@API(status = API.Status.EXPERIMENTAL)
public void sendRekordboxAnnouncement() {
if (isRunning()) {
Expand All @@ -519,7 +522,11 @@ public void sendRekordboxAnnouncement() {
}

/**
* TODO: top-level description needed.
* This method will start up all of the required pieces to emulate Rekordbox Lighting to pioneer devices on
* the network. This is not as powerful as emulating a CDJ, as that will get most ProLink devices to become
* very chatty, but rather this is for devices that don't support Pro DJ Link properly but can be coaxed to
* send status packets when they talk to RekordboxLighting (the Opus Quad being the only device at the time
* of coding this).
*
* @return true if we found DJ Link devices and were able to create the {@code VirtualRekordbox}.
* @throws Exception if there is a problem opening a socket on the right network
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -571,9 +571,10 @@ public RekordboxAnlz.TaggedSection getAnalysisSection(MediaDetails sourceMedia,
}
};

// TODO the JavaDoc here needs to be improved
/**
* Method that will use PSSI + rekordboxId to confirm that the database filesystem match the song
* Method that will use PSSI + rekordboxId to confirm that the database filesystem match the song. Will
* look up PSSI in the chosen archive for the specific RekordboxId and then see if the PSSI mathes what the
* Opus is sending us.
*
* @param dataRef This is the track/slot data
* @param pssiFromOpus PSSI sent from the opus
Expand Down

0 comments on commit 4536126

Please sign in to comment.