Add basic docs for Audio API, fixes #177.
This commit is contained in:
parent
5829a9f485
commit
e6485e4abe
19
docs/api/audio.rst
Normal file
19
docs/api/audio.rst
Normal file
@ -0,0 +1,19 @@
|
||||
.. _audio-api:
|
||||
|
||||
*********
|
||||
Audio API
|
||||
*********
|
||||
|
||||
The audio API is the interface we have built around GStreamer to support our
|
||||
specific use cases. Most backends should be able to get by with simply setting
|
||||
the URI of the resource they want to play, for these cases the default playback
|
||||
provider should be used.
|
||||
|
||||
For more advanced cases such as when the raw audio data is delivered outside of
|
||||
GStreamer or the backend needs to add metadata to the currently playing resource,
|
||||
developers should sub-class the base playback provider and implement the extra
|
||||
behaviour that is needed through the following API:
|
||||
|
||||
|
||||
.. autoclass:: mopidy.audio.Audio
|
||||
:members:
|
||||
@ -9,5 +9,6 @@ API reference
|
||||
models
|
||||
backends
|
||||
core
|
||||
audio
|
||||
frontends
|
||||
listeners
|
||||
|
||||
@ -208,6 +208,8 @@ class Audio(ThreadingActor):
|
||||
"""
|
||||
Call this to deliver raw audio data to be played.
|
||||
|
||||
Note that the uri must be set to ``appsrc://`` for this to work.
|
||||
|
||||
:param capabilities: a GStreamer capabilities string
|
||||
:type capabilities: string
|
||||
:param data: raw audio data to be played
|
||||
|
||||
Loading…
Reference in New Issue
Block a user