Closed JarbasAl closed 2 months ago
The recent changes to the ovos_audio
module primarily focus on refactoring how the OCPAudioBackend
is set up. The find_ocp
method now instantiates the OCPAudioBackend
using configuration settings and adjusts to handle older plugin versions. Additionally, the logic for selecting the default backend has been modified to simplify the process by removing conditional checks and unconditionally setting up the default audio backend, while also adding event handlers for audio playback.
File(s) | Change Summary |
---|---|
ovos_audio/audio.py |
Refactored find_ocp to instantiate OCPAudioBackend using configs, adjusted for older plugin versions, removed conditional logic related to disable_ocp , and added event handlers |
sequenceDiagram
participant Client
participant AudioService
participant OCPAudioBackend
Client->>AudioService: load_services()
AudioService->>AudioService: find_default()
AudioService->>OCPAudioBackend: Instantiate with configs
OCPAudioBackend-->>AudioService: Instance created
AudioService->>AudioService: Setup event handlers
AudioService-->>Client: Default audio backend set
In the land of code and sound, The OCPAudioBackend was found. Refactored and set with care, With configurations, everywhere. No more flags to sway the tune, Just seamless playback, afternoon to moon. 🌙
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
OCP was loaded as a regular audio plugin, this was the only way to inject it into mycroft-core
in OVOS this is no longer needed and OCP is loaded directly as part of ovos-audio (until ovos-media is released)
the compat layer is dropped to avoid issues in edge cases, such as it getting selected as the default audio plugin if no others are installed, which can cause an infinite loop at playback time
Summary by CodeRabbit
disable_ocp
flag.