
Rodio parts are well tested and need less configuration then the livekit parts. I suspect there is a bug in the livekit configuration regarding resampling. Rather then investigate that it seemed faster & easier to swap in Rodio. This opens the door to using other Rodio parts like: - Decibel based volume control - Limiter (prevents sound from becoming too loud) - Automatic gain control To use this add to settings: ``` "audio": { "experimental.rodio_audio": true } ``` Release Notes: - N/A Co-authored-by: Mikayla <mikayla@zed.dev> Co-authored-by: Antonio Scandurra <me@as-cii.com>
33 lines
1,006 B
Rust
33 lines
1,006 B
Rust
use anyhow::Result;
|
|
use gpui::App;
|
|
use schemars::JsonSchema;
|
|
use serde::{Deserialize, Serialize};
|
|
use settings::{Settings, SettingsSources};
|
|
|
|
#[derive(Deserialize, Debug)]
|
|
pub struct AudioSettings {
|
|
/// Opt into the new audio system.
|
|
#[serde(rename = "experimental.rodio_audio", default)]
|
|
pub rodio_audio: bool, // default is false
|
|
}
|
|
|
|
/// Configuration of audio in Zed.
|
|
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug)]
|
|
#[serde(default)]
|
|
pub struct AudioSettingsContent {
|
|
/// Whether to use the experimental audio system
|
|
#[serde(rename = "experimental.rodio_audio", default)]
|
|
pub rodio_audio: bool,
|
|
}
|
|
|
|
impl Settings for AudioSettings {
|
|
const KEY: Option<&'static str> = Some("audio");
|
|
|
|
type FileContent = AudioSettingsContent;
|
|
|
|
fn load(sources: SettingsSources<Self::FileContent>, _cx: &mut App) -> Result<Self> {
|
|
sources.json_merge()
|
|
}
|
|
|
|
fn import_from_vscode(_vscode: &settings::VsCodeSettings, _current: &mut Self::FileContent) {}
|
|
}
|