{"id":1303,"date":"2019-01-20T04:54:18","date_gmt":"2019-01-20T04:54:18","guid":{"rendered":"https:\/\/cml-a.com\/content\/?p=1303"},"modified":"2019-01-20T04:54:18","modified_gmt":"2019-01-20T04:54:18","slug":"plugin","status":"publish","type":"post","link":"https:\/\/cml-a.com\/content\/2019\/01\/20\/plugin\/","title":{"rendered":"Plugin"},"content":{"rendered":"<p>I made a Winamp plugin that broadcasts what song you're playing as a Discord Rich Presence.<\/p>\n<p>An uncommon scenario? Sure, although I'm not too worried about that. This idea of functionality came from the integration Spotify has with Discord right now, plus there are a lot of other interesting ways in which app developers are implementing Rich Presence.<\/p>\n<p>The main challenges for this project were understanding not one flow of communication, but two; the Discord RPC API and Winamp plugin architecture. You figure out how to do one, then how to do the other, and then merge the result together. One thing I am grateful for is the fact that Winamp is debugger-friendly and can also be launched by a debugger without issue. There wasn't anything too gnarly that happened for this project but it helped to be able to step through some things- for example, the plugin configuration menu code-- to debug. There was one problem where <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/desktop\/api\/winuser\/nf-winuser-dialogboxa\">DialogBox<\/a> was being called with NULL instead of the proper module handle, and it would indeed create a dialog box but of an unexpected type. It helped to be able to step through and debug this.<\/p>\n<p>What it looks like, in action:<\/p>\n<p><a href=\"https:\/\/cml-a.com\/content\/wp-content\/uploads\/2019\/01\/Example.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1304\" src=\"https:\/\/cml-a.com\/content\/wp-content\/uploads\/2019\/01\/Example.png\" alt=\"\" width=\"847\" height=\"584\" \/><\/a><\/p>\n<p>The source + binary distributed through GitHub repository here:\u00a0<a href=\"https:\/\/github.com\/clandrew\/wdrp\">https:\/\/github.com\/clandrew\/wdrp<\/a><\/p>\n<p>Problem solved!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I made a Winamp plugin that broadcasts what song you&#8217;re playing as a Discord Rich Presence. An uncommon scenario? Sure, although I&#8217;m not too worried about that. This idea of functionality came from the integration Spotify has with Discord right now, plus there are a lot of other interesting ways in which app developers are [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[178],"class_list":["post-1303","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-software-development-project"],"_links":{"self":[{"href":"https:\/\/cml-a.com\/content\/wp-json\/wp\/v2\/posts\/1303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cml-a.com\/content\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cml-a.com\/content\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cml-a.com\/content\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cml-a.com\/content\/wp-json\/wp\/v2\/comments?post=1303"}],"version-history":[{"count":0,"href":"https:\/\/cml-a.com\/content\/wp-json\/wp\/v2\/posts\/1303\/revisions"}],"wp:attachment":[{"href":"https:\/\/cml-a.com\/content\/wp-json\/wp\/v2\/media?parent=1303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cml-a.com\/content\/wp-json\/wp\/v2\/categories?post=1303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cml-a.com\/content\/wp-json\/wp\/v2\/tags?post=1303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}