diff --git a/oxisynth/src/core/channel_pool/channel.rs b/oxisynth/src/core/channel_pool/channel.rs index a76c2b3..795c69c 100644 --- a/oxisynth/src/core/channel_pool/channel.rs +++ b/oxisynth/src/core/channel_pool/channel.rs @@ -70,14 +70,14 @@ pub struct Channel { } impl Channel { - pub fn new(id: usize, preset: Option>) -> Self { + pub fn new(id: usize) -> Self { let mut chan = Self { id, sfontnum: None, banknum: 0, prognum: 0, - preset, + preset: None, key_pressure: [0; 128], channel_pressure: 0, diff --git a/oxisynth/src/core/channel_pool.rs b/oxisynth/src/core/channel_pool/mod.rs similarity index 75% rename from oxisynth/src/core/channel_pool.rs rename to oxisynth/src/core/channel_pool/mod.rs index 89c62f1..02b0367 100644 --- a/oxisynth/src/core/channel_pool.rs +++ b/oxisynth/src/core/channel_pool/mod.rs @@ -1,18 +1,13 @@ -use std::sync::Arc; - mod channel; pub use channel::{Channel, InterpolationMethod}; -use crate::core::soundfont::Preset; use crate::OxiError; pub struct ChannelPool(Vec); impl ChannelPool { - pub fn new(len: usize, preset: Option>) -> Self { - let channels = (0..len) - .map(|id| Channel::new(id, preset.clone())) - .collect(); + pub fn new(len: usize) -> Self { + let channels = (0..len).map(Channel::new).collect(); Self(channels) } diff --git a/oxisynth/src/core/mod.rs b/oxisynth/src/core/mod.rs index 8d482f4..7cd38b4 100644 --- a/oxisynth/src/core/mod.rs +++ b/oxisynth/src/core/mod.rs @@ -62,7 +62,7 @@ impl Core { font_bank: FontBank::new(), - channels: ChannelPool::new(settings.midi_channels as usize, None), + channels: ChannelPool::new(settings.midi_channels as usize), voices: VoicePool::new(settings.polyphony as usize, settings.sample_rate), output: OutputBuffer::new(nbuf as usize), diff --git a/oxisynth/src/core/soundfont.rs b/oxisynth/src/core/soundfont/mod.rs similarity index 100% rename from oxisynth/src/core/soundfont.rs rename to oxisynth/src/core/soundfont/mod.rs diff --git a/oxisynth/src/core/voice_pool.rs b/oxisynth/src/core/voice_pool/mod.rs similarity index 100% rename from oxisynth/src/core/voice_pool.rs rename to oxisynth/src/core/voice_pool/mod.rs diff --git a/oxisynth/src/core/voice_pool/voice.rs b/oxisynth/src/core/voice_pool/voice/mod.rs similarity index 100% rename from oxisynth/src/core/voice_pool/voice.rs rename to oxisynth/src/core/voice_pool/voice/mod.rs