#![forbid(unsafe_code)]
mod bus;
mod capture;
mod config;
mod device;
#[cfg(feature = "sb")]
mod dma;
mod engine;
mod error;
#[cfg(feature = "formats")]
pub mod formats;
pub mod midi;
pub mod music;
mod offline;
mod speaker;
pub use speaker::{Melody, SpeakerHandle, speaker_pwm};
#[cfg(feature = "opl")]
mod opl;
#[cfg(feature = "sb")]
pub mod sfx;
pub use bus::DosAudio;
pub use capture::{Capture, MusicCapture, PortWrite};
pub use config::{OplBackend, OplChip, SbModel, SoundBlasterConfig, SoundConfig};
#[cfg(feature = "opl")]
pub use device::opl::OplCore;
#[cfg(feature = "psg")]
pub use device::psg::Psg;
#[cfg(feature = "sb")]
pub use dma::{ConventionalMemory, DmaCompletion, DmaController, DmaUnit};
pub use engine::{AudioEngine, EngineStats};
pub use error::{Error, Result};
pub use game_toolkit_dosbus::{
DmaChannel, DmaDirection, DmaRequest, DmaWidth, IoDevice, IrqLine, IrqRequest, PortRange, Tick,
TickAccumulator,
};
#[cfg(feature = "gm")]
pub use midi::{GmSynth, SoundFont};
pub use midi::{MidiBackend, MidiMessage, MidiSynth};
#[cfg(feature = "mt32")]
pub use midi::{Mt32Model, Mt32Roms, Mt32Synth};
pub use music::{
MusicController, MusicDevice, MusicEvent, MusicHandle, MusicTarget, PlayOptions, PreparedMusic,
Sequence, Soundtrack, TimedEvent,
};
pub use offline::{OfflineMachine, Wav};
#[cfg(feature = "opl")]
pub use opl::{
Drum, Note, Opl, OplBank, OplBankEntry, OplBankKey, OplInstrument, OplMidiDriver, OplOperator,
OplPatch,
};
#[cfg(feature = "sb")]
pub use sfx::{SfxHandle, SfxMixer, SfxVoiceHandle};
pub type Frame = [f32; 2];
pub mod prelude {
#[cfg(feature = "formats")]
pub use crate::formats::{Dro, Imf, Smf, Vgm};
pub use crate::{
AudioEngine, DmaChannel, DosAudio, Frame, IoDevice, MusicController, MusicEvent,
MusicHandle, MusicTarget, OfflineMachine, OplBackend, OplChip, PlayOptions, PreparedMusic,
SbModel, Sequence, SoundBlasterConfig, SoundConfig, Tick, TimedEvent,
};
#[cfg(feature = "sb")]
pub use crate::{
ConventionalMemory, DmaController, DmaUnit, SfxHandle, SfxMixer, SfxVoiceHandle,
};
#[cfg(feature = "opl")]
pub use crate::{
Drum, Note, Opl, OplBank, OplBankEntry, OplBankKey, OplInstrument, OplMidiDriver,
OplOperator, OplPatch,
};
pub use crate::{MusicDevice, Soundtrack};
}
#[cfg(all(doctest, feature = "sb", feature = "formats", feature = "toolkit"))]
#[doc = include_str!("../README.md")]
struct ReadmeDoctests;