Support starting VirtualCdj on a different network interface
See original GitHub issueIs your feature request related to a problem? Please describe. I really want to get beat-link working on the same machine as rekordbox. This is because I stream live on twitch (https://twitch.tv/aphexcx) and I use beat-link to show live track metadata as I mix.
Check out this video for an example: https://youtu.be/uyb__t70EC4?t=2082
(If you want to do that too, my code for getting track metadata displayed in OBS is here! https://github.com/aphexcx/dj-link-now-playing)
This of course means I have to play off of my USB drive, because I can’t run rekordbox on my machine and my beat-link code at the same time, because VirtualCdj can’t start if rekordbox is running. It’ll complain with :
Exception in thread "main" java.net.BindException: Address already in use (Bind failed)
at java.net.PlainDatagramSocketImpl.bind0(Native Method)
at java.net.AbstractPlainDatagramSocketImpl.bind(AbstractPlainDatagramSocketImpl.java:93)
at java.net.DatagramSocket.bind(DatagramSocket.java:392)
at java.net.DatagramSocket.<init>(DatagramSocket.java:242)
at java.net.DatagramSocket.<init>(DatagramSocket.java:299)
at org.deepsymmetry.beatlink.VirtualCdj.createVirtualCdj(VirtualCdj.java:902)
at org.deepsymmetry.beatlink.VirtualCdj.start(VirtualCdj.java:1040)
at org.deepsymmetry.beatlink.data.MetadataFinder.start(MetadataFinder.java:1454)
Describe the solution you’d like I want to be able to start the VirtualCdj on a different network interface. For example, my computer is connected to my network via a LAN connection and WiFi. I want to be able to run rekordbox on my LAN network interface and start the VirtualCdj on the Wifi network interface.
Describe alternatives you’ve considered
I’ve cloned the repo and spent a few hours hacking up the createVirtualCdj()
function in VirtualCdj.java to get this working. I’ve gotten as far as seeing the two different network interfaces when it’s running, and then I hardcoded it to use the interface and address associated with my WiFi interface. However, strangely, I still get the BindException above when the socket attempts to set.
I am not sure why. I even switched things around, and made sure rekordbox is running on my WiFi interface (by disconnected the LAN cable and starting the rekordbox LINK feature), and then reconnected the LAN cable and tried to start the VirtualCdj using the LAN address. Still says the address is in use.
FWIW, after inspecting a little bit with my debugger, it appears both interfaces available on my machine seem to have the same broadcast address. Could this be the issue?
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (7 by maintainers)
Top GitHub Comments
Yeah, it frustrated me quite a bit when I ran into it myself! Sorry. Good luck! OBS should be able to talk over the network.
So because only one process on a given host can bind to the broadcast address on a given network, only one of Beat Link and rekordbox can operate at once. Binding to a broadcast address binds all network interfaces that are connected to that network.