Overview
minimodem supports multiple audio backend systems for maximum portability across different operating systems and configurations:- ALSA - Advanced Linux Sound Architecture (Linux)
- PulseAudio - Cross-platform sound server (Linux, BSD, others)
- sndio - Simple audio API (OpenBSD, other BSD systems)
- sndfile - Audio file I/O (all platforms)
Backend Selection
System Default
When no backend is specified, minimodem uses the system default:src/simpleaudio.c lines 83-93):
- PulseAudio (if available)
- ALSA (if PulseAudio not available)
- sndio (if neither above available)
The system default is determined at compile time based on which libraries are available when minimodem is built.
Explicit Backend Selection
You can force a specific backend using command-line options:ALSA Backend
Overview
ALSA (Advanced Linux Sound Architecture) provides low-latency audio access on Linux systems.Command-Line Option
Device Specification
Default device:Implementation Details
Fromsrc/simpleaudio-alsa.c lines 117-127:
Examples
List ALSA Devices
Use USB Audio Device
Use Default Device
Configuration
ALSA parameters (fromsrc/simpleaudio-alsa.c line 152):
- Format: S16 or FLOAT
- Access: Interleaved
- Channels: Typically 1 (mono)
- Sample rate: Default 48000 Hz (configurable with
--samplerate) - Latency: 100ms buffer
- Soft resample: Enabled
PulseAudio Backend
Overview
PulseAudio is a sound server that provides network-transparent audio and automatic device management.Automatic Operation
PulseAudio is the default backend on most modern Linux systems:Implementation Details
Fromsrc/simpleaudio-pulse.c:
- Uses
pa_simpleAPI for straightforward audio I/O - Automatically selects default source (recording) or sink (playback)
- Handles sample format conversion automatically
Configuration
Buffer attributes (lines 116-127):Advantages
- Automatic device management
- Network audio support
- Per-application volume control
- Better integration with desktop environments
Examples
sndio Backend
Overview
sndio is a small, simple audio and MIDI framework used primarily on OpenBSD and other BSD systems.Command-Line Option
Device Specification
Default device:Implementation Details
Fromsrc/simpleaudio-sndio.c lines 84-111:
Supported Formats
- S16: 16-bit signed integer (supported)
- FLOAT: Not currently supported in sndio backend
Configuration
From lines 90-103:File I/O Backend (sndfile)
Overview
The sndfile backend enables reading from and writing to audio files instead of live audio devices.Command-Line Option
Supported Formats
Fromsrc/simpleaudio-sndfile.c lines 111-141, supported file formats include:
- WAV - Microsoft Wave
- AIFF - Apple Audio Interchange File Format
- FLAC - Free Lossless Audio Codec
- OGG - Ogg Vorbis
- AU - Sun/NeXT audio
- RAW - Raw PCM data
- And many more…
Examples
Receive from Audio File
Transmit to Audio File
Use with Pipes
Implementation Details
Automatic format detection (lines 144-157):Sample Format Selection
minimodem supports two sample formats:S16 (16-bit Integer)
Default format:- Pros: Lower memory usage, faster processing
- Cons: Slightly lower precision
- Typical use: Most applications, real-time decoding
FLOAT (32-bit Float)
Enable with--float-samples:
- Pros: Higher precision, better for analysis
- Cons: More memory, slightly slower
- Typical use: File generation, quality-critical applications
- Required: For RX mode (automatically enabled)
Receive mode automatically uses floating-point samples internally for FFT processing, regardless of the
--float-samples option.Sample Rate Configuration
Set sample rate with--samplerate (-R):
Build Configuration
Checking Available Backends
When building from source, configure displays enabled backends:Disabling Backends
Fromconfigure.ac lines 19-65:
Troubleshooting
Backend Not Available
Error:This build of minimodem was configured without alsa support
Solution: Rebuild minimodem with the required backend:
Device Busy
Error:Cannot create ALSA stream: Device or resource busy
Solutions:
- Close other applications using the audio device
- Try PulseAudio backend instead:
minimodem --rx 1200 - Check for exclusive access:
fuser -v /dev/snd/*
No Sound Output
Problem: Minimodem runs but no audio is transmitted Solutions:- Check mixer settings:
alsamixer - Verify device selection:
--alsa=plughw:0,0 - Test audio path:
speaker-test -t sine - Increase volume: Use system volume controls
Poor Quality or Dropouts
Problem: Audio has glitches, clicks, or missing frames Solutions:- Increase buffer size (not directly configurable in minimodem)
- Close CPU-intensive applications
- Use ALSA directly instead of PulseAudio
- Reduce sample rate if very high
Best Practices
Performance Comparison
| Backend | Latency | CPU Usage | Compatibility |
|---|---|---|---|
| ALSA | Low | Low | Linux only |
| PulseAudio | Medium | Medium | Cross-platform |
| sndio | Low | Low | BSD focus |
| sndfile | N/A | Low | All platforms |
Advanced Examples
Record and Decode Pipeline
Multi-Channel Recording
Network Audio Streaming
With PulseAudio network audio:Batch File Processing
See Also
- Custom Baud Rates - Configure data rates
- Frequency Tuning - Adjust FSK frequencies
- Confidence Thresholds - Signal quality settings