The flutter_soloud package includes several example projects demonstrating various features. These examples can be found in the example folder of the plugin.
lib/main.dart- Basic setup and usage examplelib/output_device/output_device.dart- How to list and select output deviceslib/audio_context/audio_context.dart- How to use audio session
lib/audio_data/audio_data.dart- Real-time audio waveform and FFT visualization usingAudioVisualizationDatastreamlib/wave_data/wave_data.dart- Read and display audio samples from files
lib/audio_context/audio_context.dart- How to use audio_session and audio_service
lib/waveform/waveform.dart- Generate and control waveforms in real-timelib/metronome/metronome.dart- Create a precise metronome. Shows how to useplayClocked()
lib/buffer_stream/generate.dart- Generate PCM audio in anIsolate
lib/buffer_stream/websocket.dart- Stream PCM and Opus audio via WebSocket
lib/buffer_stream/web_radio.dart- Receive streamed audio from online web radio
lib/buffer_stream/simple_noise_stream.dart- For testing and undestanding audio streaming and buffering
lib/pull_buffer/file_stream.dart- It demonstrates the callback-driven pull model and the custom seek/progress bar.
lib/pull_buffer/http_range_stream.dart- Streams an audio file from a remote server using HTTP Range requests and feeds it to an [AudioSource].
lib/mixing_bus/mixing_bus.dart- How to use a mixing bus
lib/mixer_output_capture/mixer_output_capture.dart- Capture the master mixer output as a stream of audio data.
Audio Effects
| Example | Description |
|---|---|
lib/filters/compressor.dart | Dynamic range compression |
lib/filters/limiter.dart | Peak limiting and volume control |
lib/filters/pitchshift.dart | Real-time pitch shifting |
lib/filters/parametric_eq.dart | Parametric equalizer |
Running the Examples
- Clone the repository:
bash
git clone https://github.com/alnitak/flutter_soloud.git- Navigate to the example directory:
bash
cd flutter_soloud/example- Install dependencies:
bash
flutter pub get- Run a specific example:
bash
flutter run -t lib/main.dart
# Or any other example file
flutter run -t lib/waveform/waveform.dart