audiopc 0.2.1
audiopc: ^0.2.1 copied to clipboard
A Rust-powered Flutter audio plugin for local file playback, direct URL streaming, and audio processing via a CPAL backend.
π§ audiopc #
π Overview #
audiopc is a Rust-powered Flutter audio plugin built using FFI and powered by the CPAL backend.
Provide seamless playback, and advance features like equalizer, audio sample, visualizer.
πͺ Supported platforms #
- Windows β
- Android β
- Linux β
- IOS π§
- MacOS π§
- Web π¨
β¨ Features #
- π΅ Play local audio files via native CPAL backend
- π Stream audio from direct internet URLs
- π§© Decode multiple formats using Symphonia
- ποΈ Real-time processing (volume & effects, fliter, visualizer)
- π Access and query active output device configuration
- β‘ High-performance with Rust.
| Feature | Status |
|---|---|
| Local Playback | β |
| URL Streaming | β |
| Audio Processing | β |
| Device Query | β |
π¦ Installation #
π§³ Dependency #
Add to your pubspec.yaml:
dependencies:
audiopc: ^0.1.3
Dart #
void main() async {
/// Make sure you add this line before you use any api.
await RustLib.init();
runApp(YourApp());
}
Usage #
Create player instance and play audio source.
import 'package:audiopc/audiopc.dart';
final player = PcPlayer.instance();
// Set and play audio source.
player.playSource(AudioSource.path(source));
// Adjust volume.
player.setVolume(0.8);
player.setRate(0.5);
Get visualizer bars.
player.setProcessor(54, 512);
final bars = player.getBars();
Compability with other packages #
Audiopc can be used with any packages that implement features like background audio playing, etc...
β Support #
If you find this project useful, consider giving it a β on GitHub!
Contribute #
Feel free to create pull request, issues;
