CP77_radioExt icon indicating copy to clipboard operation
CP77_radioExt copied to clipboard

Add Spotify playback functionality via SMTC

Open 00Chaotic opened this issue 1 year ago • 4 comments

I'm also not usually a C++ developer and this is my first foray into Cyberpunk modding (why are there so many core mods doing seemingly similar things) so I'd appreciate any feedback or suggestions for improvement :)


This change adds a default Spotify Radio station that allows for playback on the actual Spotify app. Requires the Spotify app to be open, and then it plays/pauses automatically. The in-game radio station volume controls will not work, so the user must change the volume through the Spotify app. I've done some basic testing, as shown in the video below, but more thorough testing is still needed.

Video of the functionality

The above video doesn't capture the SMTC overlay, which displays when playing/pausing playback: image

Visualised readme changes for convenience: image

00Chaotic avatar Sep 26 '24 12:09 00Chaotic

@justarandomguyintheinternet not sure how the notifications work so I'm tagging you in hopes you see this :)

00Chaotic avatar Sep 27 '24 14:09 00Chaotic

I've realised this implementation requires the user to have Windows SDK installed. I assume it's an issue with the way I'm compiling the RadioExt.dll, but as mentioned I'm unfamiliar with C++ so I would appreciate some assistance when you have time. If I manage to solve the issue before then, I'll mention it here.

00Chaotic avatar Oct 02 '24 10:10 00Chaotic

I believe I've fixed it. I've also changed to using the newer SendInput() function instead of the deprecated keybd_event() which would be more secure and robust.

00Chaotic avatar Oct 02 '24 11:10 00Chaotic

@justarandomguyintheinternet bumping this for (likely) the last time. I've finished my playthrough of the game and don't plan on further playing/modding the game.

I'm unsure if the 2.2 update has affected this change but I imagine if the rest of the mod is fine then this should be too.

00Chaotic avatar Jan 05 '25 10:01 00Chaotic