roomeq-model 0.5.5

RoomEQ configuration, pipeline, and DSP-chain contracts
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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);
        }
    }
}