🎧 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
🔧 Platform Specific Config
Linux
Nothing to do
Windows
Nothing to do
Android
Add plugin to your main activity.
// MainActivity.kt
import com.thugbn.audiopc.AudiopcPlugin
class MainActivity : FlutterActivity() {
...
override fun configureFlutterEngine(
@NonNull flutterEngine: FlutterEngine,
) {
flutterEngine.plugins.add(AudiopcPlugin())
super.configureFlutterEngine(flutterEngine)
}
...
}
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();
⭐ Support
If you find this project useful, consider giving it a ⭐ on GitHub!
Contribute
Feel free to create pull request, issues;