Skip to content
pubscout

mp_audio_stream

0.3.0, released 8 weeks ago by an unverified publisher

Multi-platform audio stream player for raw audio data streams

WASM-ready
$ flutter pub add mp_audio_stream
Source repository

What it does

A Flutter plugin that continuously plays buffered, raw float32 multi-channel audio data streams across Android, iOS, macOS, Windows, Linux, and Web platforms. It uses miniaudio natively and WebAudio on the web.

AI-written summary of version 0.3.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to play real-time generated or streamed raw PCM audio data in a Flutter application.
  • You require cross-platform support including all desktop, mobile, and web platforms.

Skip it when

  • You simply want to play standard pre-recorded audio files like MP3 or WAV from disk or URL.
  • You need advanced high-level audio playback controls, playlists, or mixing.

Strengths

  • Supports all Flutter platforms including Web, Windows, macOS, Linux, iOS, and Android.
  • Handles real-time generated raw audio data stream playback efficiently.
  • Built with high-performance miniaudio library for native platforms.

Weaknesses

  • Limited to raw float32 multi-channel audio data streams.
  • Requires manual buffer and stream management.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
2

For developers cloning the repository, the miniaudio submodule must be updated using git submodule update --init. On the web platform, resume() must be called after user interaction.

import 'package:mp_audio_stream/mp_audio_stream.dart';

void main() async {
  final audioStream = getAudioStream();
  audioStream.init(channels: 2);
  audioStream.resume();
  // push Float32List samples here
  audioStream.uninit();
}

Alternatives

Packages that do the same job and could replace mp_audio_stream.

  • just_audio

    Pick just_audio if you need feature-rich playback for standard audio files and URLs rather than low-level raw audio streaming.

  • audioplayers

    Pick audioplayers for simpler playback of audio files and simple sound effects across platforms.

Works with

Packages commonly used together with mp_audio_stream: ones it builds on, ones built on it, and its own family.