use std::sync::Arc;
use crate::{Preset, Synth};
use crate::core::{InterpolationMethod, Settings};
impl Synth {
pub fn settings(&self) -> &Settings {
self.core.settings()
}
pub fn set_gain(&mut self, gain: f32) {
self.core.set_gain(gain)
}
pub fn gain(&self) -> f32 {
self.core.gain()
}
pub fn set_polyphony(&mut self, polyphony: u16) -> Result<(), ()> {
self.core.set_polyphony(polyphony)
}
pub fn polyphony(&self) -> u32 {
self.core.polyphony()
}
pub fn internal_buffer_size(&self) -> usize {
self.core.internal_bufsize()
}
pub fn set_interp_method(&mut self, chan: Option<usize>, interp_method: InterpolationMethod) {
self.core.set_interp_method(chan, interp_method)
}
pub fn channel_preset(&self, chan: u8) -> Option<&Arc<Preset>> {
self.core.channel_preset(chan)
}
}