diff --git a/docs/_static/.placeholder b/docs/_static/.placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/_static/thread_communication.png b/docs/_static/thread_communication.png new file mode 100644 index 00000000..4741a18c Binary files /dev/null and b/docs/_static/thread_communication.png differ diff --git a/docs/_static/thread_communication.txt b/docs/_static/thread_communication.txt new file mode 100644 index 00000000..4357023f --- /dev/null +++ b/docs/_static/thread_communication.txt @@ -0,0 +1,32 @@ +Script for use with www.websequencediagrams.com +=============================================== + +Main -> NadMixer: start +activate NadMixer +note over NadMixer: calibrate device +NadMixer -> Main: ready +Main -> MpdHandler/Backend: start +activate MpdHandler/Backend +MpdHandler/Backend -> despotify: connect to Spotify +activate despotify +MpdHandler/Backend -> Main: ready +Main -> MpdServer/MpdSession: start +activate MpdServer/MpdSession +note over MpdServer/MpdSession: opens port +MpdServer/MpdSession -> Main: ready +Client -> MpdServer/MpdSession: connect +Client -> MpdServer/MpdSession: play 1 +MpdServer/MpdSession -> MpdHandler/Backend: play 1 +MpdHandler/Backend -> despotify: play first track +Client -> MpdServer/MpdSession: setvol 50 +MpdServer/MpdSession -> MpdHandler/Backend: setvol 50 +MpdHandler/Backend -> NadMixer: volume = 50 +Client -> MpdServer/MpdSession: status +MpdServer/MpdSession -> MpdHandler/Backend: status +MpdHandler/Backend -> NadMixer: volume? +NadMixer -> MpdHandler/Backend: volume = 50 +MpdHandler/Backend -> MpdServer/MpdSession: status response +MpdServer/MpdSession -> Client: status response +despotify -> MpdHandler/Backend: end of track callback +MpdHandler/Backend -> despotify: play second track +MpdServer/MpdSession -> MpdHandler/Backend: stop diff --git a/docs/development/internals.rst b/docs/development/internals.rst index 10a79152..0062f2df 100644 --- a/docs/development/internals.rst +++ b/docs/development/internals.rst @@ -31,3 +31,13 @@ not Mopidy. "spytify" -> "despotify" [ label="use C library" ] "DespotifyBackend" -> "AlsaMixer" [ label="use mixer API" ] "AlsaMixer" -> "alsaaudio" [ label="use Python library" ] + + +Thread communication +==================== + +.. warning:: + + This is a plan, and does not necessarily reflect what has been implemented. + +.. image:: /_static/thread_communication.png