GithubHelp home page GithubHelp logo

digimezzo / dopamine-externalcontrol-support Goto Github PK

View Code? Open in Web Editor NEW

This project forked from magentaize/dopamine-externalcontrol-support

0.0 2.0 0.0 41 KB

A plug-in to add Dopamine external control support

License: GNU General Public License v3.0

C# 100.00%

dopamine-externalcontrol-support's Introduction

Dopamine-ExternalControl-Support

A plug-in to add Dopamine external control support

How to use it

Add reference Dopamine.ExternalControl.Support in your project, and use in-built factory method to create Dopamine plug-in client. There's a simple sample in the other folder. For more APIs, please look here: IExternalControlServer, IFftDataServer

How to control behaviors of Dopamine

After create a IExternalControlServer, you can simply use IExternalControlServer.PlayNext() to force Dopamine to play next track and so on.

How to get events raised by Dopamine

There are many events in ExternalControlClientCallback, you can subscribe them and then call IExternalControlServer.RegisterClient() to register your client in Dopamine, once Dopamine raises some event such as PlaybackPaused, the corresponding method will be called.

How to get FFT data of Dopamine

Dopamine uses shared memory to provide FFT data. Before reading it, you must call IFftDataServer.GetFftData() to notice Dopamine someone want to read FFT data, then you can read it.

How to make sure Dopamine has been opened (external control is enabled)

  1. If the client is opened after Dopamine and external control isn't enabled, WCF will throw a exception when create channel.
  2. If the client is opened before Dopamine, you can call IExternalControlServer.SendHeartbeat() to detect whether Dopamine is online or not, if external control isn't enabled, WCF will throw a exception.

How to start using this api from scratch

  1. Right click on your project, choose Add->Service Reference.
  2. Open Dopamine and enable its external control service in Settings->Playback->External Control.
  3. Go back to Visual Studio, enter "net.pipe://localhost/Dopamine/ExternalControlService/mex" in the textbox below "Address".
  4. Edit the namespace of this service at the bottom of this window and then click OK.

dopamine-externalcontrol-support's People

Contributors

magentaize avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.