Commit Graph

28 Commits (5f4c68e5831e668f11dddc9a2d00bf11698f8c5b)

Author SHA1 Message Date
jarbasal 24c4ba4a05 Fix loading of audioservice plugins 2021-07-23 09:17:58 +02:00
Kris Gesling e75a05557b docstring cleanup 2021-05-11 15:10:32 +09:30
Åke Forslund aace28dfa3 Use lock around play and stop
Moves the stopping logic to separate method to be able to call from
locked contexts
2021-01-23 11:09:54 +01:00
Åke Forslund c00d37935a Simplify restore audio volume handler 2021-01-22 14:40:00 +01:00
Åke Forslund 375adbbdf0 Make audioservice load backends without callback 2021-01-15 13:49:40 +01:00
Åke Forslund d8ff26bbd9 Add plugin loading of audioservices
All modules registered under the entrypoint group "mycroft.plugin.audioservice"

These shall refer to a module with either an autodetect function or a
load_service function.
2020-09-23 07:46:13 +02:00
Åke Forslund 4e7809d732 Handle ntp sync in audioservice ready wait
Events (any python threading in general) don't use monotonic time and
can be affected by an ntp sync.

This replaces the normal event with the MonotonicEvent class handling jumps
into the future.
2020-09-10 13:26:25 +02:00
Åke Forslund d704981613 Set a more specific module name for audioservices
The basic name caused collisions between the "vlc" audioservice and the
vlc module. This prepends an "audioservice_" to the service folder name.
2020-08-28 07:59:06 +02:00
Åke Forslund ba8c41486c Load audioservices using importlib instead of imp
imp has been deprecated for quite some time
2020-08-21 08:00:08 +02:00
Åke Forslund 0a04efd88d Add system for checking audio service readiness
The new wait_for_loaded() method will wait until services has been
loaded. It has a 3 minute timeout (default)

This improves the audio service readiness indication to not trigger
until the services are loaded.
2020-07-24 22:12:54 +02:00
Åke Forslund 2bb978362f Use bus.wait_for_message() method to wait for speak 2020-07-05 16:38:52 +02:00
Kris Gesling bf6e6af3e3 remove messagebus argument 2020-06-29 21:38:12 +09:30
Kris Gesling e39fe64ba4 minor cleanup for PR review 2020-06-29 14:30:39 +09:30
Kris Gesling c4478e82ad ensure volume restored after mic recording 2020-06-25 16:17:54 +09:30
Kris Gesling 4345011f7f prevent audio playing between mic record and handling 2020-06-19 15:27:48 +09:30
Åke Forslund 97ff8a4708 Send mycroft.audio.queue_end
The message is sent when there are no more tracks in the queue and
playback has stopped.
2020-01-15 11:13:00 +01:00
Åke Forslund e74b0e3900 Add audioservice method tests
This includes init, shutdown, play, stop, next, previous, pause,
seek_backward, seek_forward, queue lower_volume, restore_volume and resume.
2020-01-15 09:06:50 +01:00
Åke Forslund 3fea4b1e6f Remove old manual pulse ducking 2019-08-31 14:27:06 +02:00
Åke Forslund 9248be1691 Add list of available backends to audioservice
The message returned is a dict of all available audio backends as keys
containing 'supported_uris' listing supported uri types (file:// http://
etc.), 'remote' (bool) True if remote), 'default' (bool) true if the
default audio backend.
2019-04-08 15:28:56 +02:00
Åke Forslund 0d401c8757 Remove superfluous mycroft.stop handler removal 2019-04-08 15:13:34 +02:00
Åke Forslund 5c26a5d9a5 Play on local audiobackends before trying remotes
- Adds RemoteAudioBackend class, which is used to differentiate between
Remotes and local audio backends
- When searching for audio backends the backends are storted to first
check local ones and secondly remote ones
2019-01-21 16:10:24 +01:00
jarbasal 1c3543f5e5 Support for audio seek
The audioservice can now jump forward and backward in the audio stream/file

The functionality is accessed via the audioservice class's seek_forward(),
seek_backward() and seek() methods
2019-01-12 13:10:54 +01:00
Åke Forslund 38701a9790 Remove inheritance from object
Inheriting from object isn't necessary in python3.
2019-01-11 09:24:21 +01:00
Åke Forslund 8859ff1d3b Don't stop audio right after play start
The common play skill sends a stop message in the CPS_start(), if the play message is sent too close to the stop message it may be executed before the stop message causing playback to immediately stop.

To circumvent this a 1 second stop ignore time is added.
2018-11-15 13:57:17 +01:00
Åke f091f44c85 Audioservice repeat (#1805)
* Add repeat option to audioservice

The audioservice.play() method now accepts a repeat parameter. If this
parameter is True the playlist passed to the audio service will be
repeated.

* Add repeat support to vlc

* Add the repeat parameter to all services

Not functional but playback will work at least. Hacktoberfest?
2018-09-24 15:12:12 -05:00
Åke Forslund 7b4c6ed583 Audio service mimetypes
Add possibility for mimetypes to be passed with each track.
Make simple audio service try to detect mime type if missing
2018-08-23 08:41:01 +02:00
Åke 64476eb143 Replace emitter/ws with bus (#1757)
Makes the code a bit more understandable
2018-08-21 20:50:50 -05:00
Åke Forslund 6fa17dbed3 Separate AudioService from main 2018-08-16 20:45:17 +02:00