use super::types::CtcHrtfSpeakerConfig;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use std::path::PathBuf;
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
pub struct CtcHrtfConfig {
pub hrtf_file: PathBuf,
pub speakers: Vec<CtcHrtfSpeakerConfig>,
}
impl CtcHrtfConfig {
pub fn resolve_paths(&mut self, base_dir: &std::path::Path) {
if self.hrtf_file.is_relative() {
self.hrtf_file = base_dir.join(&self.hrtf_file);
}
}
}