pub struct SoundConfig { /* private fields */ }Expand description
Hardware and output configuration. Builders are validated by DosAudio::split.
Implementations§
Source§impl SoundConfig
impl SoundConfig
Sourcepub fn sb_model(self, model: SbModel) -> Self
pub fn sb_model(self, model: SbModel) -> Self
Select a DSP model, installing default ISA resources if no card is present.
Sourcepub fn dma16(self, channel: u8) -> Self
pub fn dma16(self, channel: u8) -> Self
Select SB16 DMA: word channel 5/6/7, or the same byte channel as D.
Sourcepub fn from_blaster(value: &str) -> Result<Self>
pub fn from_blaster(value: &str) -> Result<Self>
Parse a BLASTER value containing A (hex), I, D, T and optional H fields.
A/I/D/T are required; T values 1/2/3/4/6 select SB1/Pro/SB2/Pro2/SB16. H is valid only for SB16 and defaults to 5. Unknown or duplicate fields are errors. Resource and feature validation also runs at construction.
Sourcepub fn sound_blaster(self, resources: SoundBlasterConfig) -> Self
pub fn sound_blaster(self, resources: SoundBlasterConfig) -> Self
Install a Sound Blaster 2.0 and its OPL2 using the supplied ISA resources.
Sourcepub fn speaker(self, enabled: bool) -> Self
pub fn speaker(self, enabled: bool) -> Self
Install or remove PIT channel 2 and the PC speaker.
Sourcepub fn mpu401(self, backend: MidiBackend) -> Self
pub fn mpu401(self, backend: MidiBackend) -> Self
Install an MPU-401 UART and MIDI synthesis backend.
Sourcepub fn midi_port(self, base: u16) -> Self
pub fn midi_port(self, base: u16) -> Self
Relocate the MPU-401 to an aligned base in 300h through 360h.
Sourcepub fn opl_backend(self, backend: OplBackend) -> Self
pub fn opl_backend(self, backend: OplBackend) -> Self
Select the FM synthesis backend.
Sourcepub fn sample_rate(self, sample_rate: u32) -> Self
pub fn sample_rate(self, sample_rate: u32) -> Self
Output sample rate, from 8,000 through 192,000 Hz.
Sourcepub fn queue_capacity(self, capacity: usize) -> Self
pub fn queue_capacity(self, capacity: usize) -> Self
Fixed command queue capacity; must be nonzero.