Implement Songbird driver configuration (#1074)

This commit is contained in:
Kyle Simpson
2020-11-11 22:40:09 +00:00
committed by GitHub
parent 26c9c9117c
commit 8b7f388f7b
14 changed files with 604 additions and 113 deletions

View File

@@ -11,11 +11,13 @@
mod config;
pub(crate) mod connection;
mod crypto;
mod decode_mode;
pub(crate) mod tasks;
pub use config::Config;
use connection::error::Result;
pub use crypto::Mode as CryptoMode;
pub use crypto::*;
pub use decode_mode::DecodeMode;
use crate::{
events::EventData,
@@ -187,6 +189,13 @@ impl Driver {
self.send(CoreMessage::SetTrack(None))
}
/// Sets the configuration for this driver.
#[instrument(skip(self))]
pub fn set_config(&mut self, config: Config) {
self.config = config.clone();
self.send(CoreMessage::SetConfig(config))
}
/// Attach a global event handler to an audio context. Global events may receive
/// any [`EventContext`].
///