Agent skill

flutter_soloud Push Buffer Streaming

by alnitak in alnitak/flutter_soloud

Teaches the push buffer-stream API of flutter_soloud for playing audio that arrives in chunks, such as icecast radio, WebSocket PCM feeds or streaming TTS, instead of a complete file.

MITAuto-check passedMobile

Install flutter_soloud Push Buffer Streaming

skills CLI
$ npx skills add alnitak/flutter_soloud --skill flutter-soloud-streaming -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install alnitak/flutter_soloud flutter-soloud-streaming --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/alnitak/flutter_soloud.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/flutter-soloud-streaming .claude/skills/flutter-soloud-streaming && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
flutter-soloud-streaming
GitHub stars
424
Token cost
~2.5k tokens
SKILL.md length
939 words
Files
2 (incl. references)
Skills in repo
14
Repo updated
First seen
Licence
MIT

At a glance

Teaches the push buffer-stream API of flutter_soloud for playing audio that arrives in chunks, such as icecast radio, WebSocket PCM feeds or streaming TTS, instead of a complete file.

  • Playing audio from a WebSocket or icecast stream in a Flutter app
  • SKILL.md covers Minimal example, The API shape, Traps and More depth, plus 1 more section
  • Calls dart
  • Streaming TTS or LLM-generated audio as it is produced

What it does

The skill covers setBufferStream, addAudioDataStream and setDataIsEnded, the API for playing audio as it arrives rather than loading a complete file with loadFile, loadMem or loadUrl. An AudioSource is created with setBufferStream, chunks are pushed synchronously with addAudioDataStream from any isolate, and setDataIsEnded marks the stream complete so soundEvents can report playback completion. The engine auto-pauses when the buffer runs dry and resumes once bufferingTimeNeeds seconds are buffered again.

It documents the full method set verified against the package source: setBufferStream's parameters such as maxBufferSizeBytes, bufferingType and sample format, resetBufferStream to retune a source to new content, getBufferSize, getStreamTimeConsumed (only valid for BufferingType.released streams) and setBufferIcyMetaInt, which must be called once before the first chunk to let the engine strip icecast metadata from MP3 or Ogg-FLAC streams.

A references/recipes.md file holds worked examples. This fits icecast or web radio, WebSocket audio, streaming text-to-speech or LLM audio APIs, and procedurally generated PCM.

When your agent uses it

  • Playing audio from a WebSocket or icecast stream in a Flutter app
  • Streaming TTS or LLM-generated audio as it is produced
  • Playing procedurally generated PCM audio in real time

Example prompts

  • “Add push buffer streaming to play our TTS API's audio chunks as they arrive.”
  • “Play this icecast radio stream with flutter_soloud and strip the icy metadata.”
  • “Stream generated PCM audio into flutter_soloud as it's produced.”

Requirements

  • The flutter_soloud Flutter package

What it can do on your machine

Read from SKILL.md and the folder at commit 289697e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • dart

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

flutter_soloud Push Buffer Streaming loads about 2.5k tokens when it runs, and up to ~3.9k if it reads all its reference files. Until then it costs about 99 tokens; SKILL.md has 939 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~99
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from alnitak/flutter_soloud at commit 289697e, republished under its MIT licence (© alnitak). 939 words, ~2,450 tokens.

Download SKILL.mdSave it as .claude/skills/flutter-soloud-streaming/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
flutter-soloud-streaming
description
Teaches the push buffer-stream API of the flutter_soloud package (setBufferStream, addAudioDataStream, setDataIsEnded, BufferingType, BufferType, icy metadata). Use when the user wants to play audio that arrives in chunks — internet/icecast radio, WebSocket PCM feeds, TTS/LLM streaming APIs, or procedurally generated PCM — instead of loading a complete file or asset.
version
3

Push buffer streaming in flutter_soloud

Push streaming plays audio while it is still arriving: you create an AudioSource with SoLoud.instance.setBufferStream(...), push chunks with addAudioDataStream(source, bytes), and mark the end with setDataIsEnded(source). The engine decodes and buffers internally, auto-pausing when the buffer runs dry and resuming once bufferingTimeNeeds seconds are buffered again. This is the API for icecast/web radio, WebSocket audio, streaming TTS, and generated PCM — not for complete files on disk (use loadFile/loadMem/loadUrl for those).

Minimal example

dart
import 'dart:typed_data';
import 'package:flutter_soloud/flutter_soloud.dart';

Future<void> main() async {
  await SoLoud.instance.init();

  // Synchronous — no await. Returns an AudioSource immediately.
  final stream = SoLoud.instance.setBufferStream(
    maxBufferSizeBytes: 1024 * 1024 * 100, // default: 100 MB cap, not pre-allocated
    bufferingType: BufferingType.released, // free played data (radio-style)
    bufferingTimeNeeds: 2,                 // seconds buffered before unpause
    sampleRate: 44100,
    channels: Channels.stereo,
    format: BufferType.auto,               // detect MP3, WAV, FLAC, Ogg, AAC, AC-3, E-AC-3
    onBuffering: (isBuffering, handle, time) {
      // isBuffering=true: engine paused, waiting for data
      // isBuffering=false: resumed
    },
    onMetadata: (metadata) {
      // AudioMetadata; fires on first data and on mid-stream changes
    },
  );

  // Synchronous too. Safe to call before any data arrives — playback
  // starts once bufferingTimeNeeds seconds are buffered.
  final handle = SoLoud.instance.play(stream);

  // ... as chunks arrive (http stream, WebSocket, generator):
  SoLoud.instance.addAudioDataStream(stream, someUint8ListChunk);

  // When the feed ends (or never, for live radio):
  SoLoud.instance.setDataIsEnded(stream);

  // Optional: know when playback actually finished. Only fires if
  // setDataIsEnded was called.
  stream.soundEvents.listen((event) {
    if (event.event == SoundEventType.handleIsNoMoreValid &&
        event.handle == handle) {
      // finished playing
    }
  });
}

The API shape

All of these live on SoLoud.instance and operate on the AudioSource returned by setBufferStream. Verified against lib/src/soloud.dart and lib/src/enums.dart:

  • AudioSource setBufferStream({int? maxBufferSizeBytes, Duration? maxBufferSizeDuration, BufferingType bufferingType = BufferingType.preserved, double bufferingTimeNeeds = 2, int sampleRate = 24000, Channels channels = Channels.mono, BufferType format = BufferType.s16le, bool autoDispose = false, void Function(bool isBuffering, int handle, double time)? onBuffering, void Function(AudioMetadata)? onMetadata}) — synchronous factory. maxBufferSizeBytes and maxBufferSizeDuration are mutually exclusive (asserted); neither pre-allocates memory, they only cap how much data may be added.
  • void addAudioDataStream(AudioSource source, Uint8List audioChunk) — push one chunk. Synchronous, callable from any isolate (@pragma('vm:entry-point') functions in the example use it).
  • void setDataIsEnded(AudioSource sound) — marks the stream complete. Without this, soundEvents never reports playback completion.
  • void resetBufferStream(AudioSource sound) — drops buffered data so you can retune the same source to new content.
  • int getBufferSize(AudioSource sound) — current buffered size in bytes.
  • Duration getStreamTimeConsumed(AudioSource sound) — elapsed play time; only for BufferingType.released streams (throws for other sounds).
  • void setBufferIcyMetaInt(AudioSource sound, int icyMetaInt) — pass the icy-metaint response header of an icecast stream so the engine can strip/extract MP3 or Ogg-FLAC metadata. Must be called once, before the first addAudioDataStream. setMp3BufferIcyMetaInt is a deprecated alias of this.

Key enums (lib/src/enums.dart):

  • BufferType — f32le, s8, s16le, s32le are raw interleaved PCM (you must set sampleRate/channels correctly). auto detects MP3, WAV, FLAC, Ogg (Opus, Vorbis, FLAC), AAC (ADTS), AC-3, and E-AC-3 streams and ignores sampleRate/channels (on Linux, decoding AAC/AC-3/E-AC-3 requires FFmpeg libavcodec/libavformat runtime libraries; on Web, AC-3 and E-AC-3 streaming is not supported by any browser; core formats work out of the box).
  • BufferingType — preserved: keeps all data in memory, allows multiple simultaneous handles, seeking and looping. released: frees played data (bounded memory for endless feeds), but plays once, cannot seek, and getPosition always returns 0 — use getStreamTimeConsumed instead.

Divergences from audioplayers/just_audio habits:

  • No setUrl/AudioSource.uri streaming; you do the HTTP/WebSocket I/O yourself and push raw bytes.
  • setBufferStream and play are synchronous — await SoLoud.instance.play(stream) compiles but is pointless; the docs snippet showing that is stale.
  • There is no built-in position stream for released streams; poll getStreamTimeConsumed on a timer (the example's buffer_widget.dart does exactly this).
  • Buffer underruns are not errors: the engine pauses and fires onBuffering(isBuffering: true, ...), then resumes automatically.
Show full SKILL.md (506 more words)Show less

Traps

  • MP4 and M4A containers are NOT supported for streaming. Container files with ISO BMFF / MP4 atom structures (moov, mdat) require random access to read header atom offsets and cannot be streamed chunk-by-chunk with setBufferStream or setPullBufferStream. For real-time streaming, use elementary streams (AAC ADTS, AC-3, E-AC-3, OGG, MP3, WAV, or raw PCM). MP4 and M4A are only supported for full-file/asset/memory loading (loadFile, loadAsset, loadMem, loadUrl).
  • AC-3 and E-AC-3 streaming is NOT supported on the Web platform in any browser. Google Chrome, Chromium browsers, and Mozilla Firefox do not support AC-3 or E-AC-3 due to proprietary Dolby Digital licensing restrictions. Safari's WebCodecs engine rejects raw AC-3 elementary stream frames. AC-3 and E-AC-3 streaming is native-only (iOS, macOS native, Android, Windows, and Linux with FFmpeg). On Web, feeding AC-3/E-AC-3 stream data returns PlayerErrors.audioFormatNotSupported. For cross-browser web streaming, use AAC (ADTS), Opus, MP3, FLAC, or raw PCM.
  • BufferingType.released plays exactly once. A second play on the same source throws SoLoudBufferStreamCanBePlayedOnlyOnceCppException. When it finishes, the buffer is empty and you must dispose the source yourself (or pass autoDispose: true).
  • getPosition lies for released streams — always Duration.zero. Use getStreamTimeConsumed(sound); calling it on a non-released sound throws.
  • Reaching the max buffer size ends the stream. Once the cap is hit, the stream is treated as ended and further addAudioDataStream calls throw SoLoudStreamEndedAlreadyCppException (the web_radio example catches it and reconnects). Size the cap for the feed, or use released.
  • Icy metadata ordering. Request the header with Icy-MetaData: 1 on the HTTP request, then call setBufferIcyMetaInt(source, int.parse(headers['icy-metaint'] ?? '0')) on the first audio chunk, before any addAudioDataStream. Later calls are ignored.
  • With format: BufferType.auto, sampleRate and channels are ignored — the decoder takes them from the container. They only matter for raw PCM formats.
  • Raw PCM must match the declared format exactly: interleaved, little-endian, correct sample rate and channel count; the engine resamples to sampleRate but does not channel-convert or fix wrong formats — mismatch means noise or wrong speed, not an error.
  • Compressed streaming needs Xiph libs (Ogg, Vorbis, Opus, FLAC). If the app was built with them excluded (no_xiph_libs: true), addAudioDataStream of compressed data throws SoLoudXiphLibsNotAvailableException.
  • Forgetting setDataIsEnded leaves the stream "live" forever: soundEvents never emits handleIsNoMoreValid and (with preserved) the buffer keeps growing.
  • maxBufferSizeDuration is computed from sampleRate/channels as ms * sampleRate * channels * 4 bytes (internal float storage) — for auto sources this conversion is approximate.

More depth

  • Full recipes (icecast radio with icy metadata, WebSocket PCM, procedural PCM in an isolate): references/recipes.md
  • Pull-model streaming (engine requests data via callback; for huge files and byte-range fetching) is covered by the sibling skill flutter-soloud-pull-streaming (skills/flutter-soloud-pull-streaming/SKILL.md).
  • Runnable demos in this repo: example/lib/buffer_stream/web_radio.dart, websocket.dart, generate.dart, simple_noise_stream.dart (the last one is the smallest complete example).

Keeping this skill current

This skill ships inside the flutter_soloud package, so upgrading flutter_soloud can carry a newer revision of it than the copy installed in the project. To check, run:

sh
dart run flutter_soloud:skills --check

It reports the installed and bundled skill versions and exits non-zero when an update is available. Offer to update with dart run flutter_soloud:skills (which touches only the skills, never pubspec or build files).

© alnitak, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/flutter-soloud-streaming of alnitak/flutter_soloud.

  • SKILL.md
  • references/recipes.md

Open the folder on GitHubat commit 289697e

Compare with similar skills

flutter_soloud Push Buffer Streaming next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

flutter_soloud Push Buffer Streaming compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
flutter_soloud Push Buffer Streaming this skillalnitak/flutter_soloud424—~2.5kAutomated safety check: PassMIT
Generate Images With Firebase AIevanca/flutter-ai-rules647—~2.3kAutomated safety check: PassMIT
Apple Designvrcm-team/VRCM1791 repos~6.2kAutomated safety check: PassMIT
Add Flutter Docusaurus Localematthiasn/lotti1.2k—~1.2kAutomated safety check: PassGPL-3.0
Flutter Pub ReleaseMixinNetwork/flutter-plugins512—~1.3kAutomated safety check: PassMIT
Frb Add Contributorfzyzcjy/flutter_rust_bridge5.4k—~1.6kAutomated safety check: PassMIT

Similar skills

  • Generate Images With Firebase AI

    evanca/flutter-ai-rules

    A skill your agent uses when generating or editing images from Flutter/Dart with Firebase AI Logic and a Gemini image model (Nano Banana), making the first call work, choosing Gemini Developer API…

    647 GitHub stars~2.3k tokensUpdated 23 days ago
    MobileAuto-check passed
  • Apple Design

    vrcm-team/VRCM

    Cross-platform UI/UX design reviewer grounded in Apple's Human Interface Guidelines (122 pages pulled from developer.apple.com, including 57 component pages) plus a design-craft lens for…

    179 GitHub starsUsed in 1 repo~6.2k tokens
    MobileAuto-check passed
  • Add, complete, or audit a locale across a Flutter application's ARB catalogs and a localized Docusaurus manual, including generated localization code, locale selectors, native platform declarations…

    1.2k GitHub stars~1.2k tokensUpdated today
    MobileAuto-check passed
  • Flutter Pub Release

    MixinNetwork/flutter-plugins

    Prepare and draft a pub.dev release for a package in the flutter-plugins monorepo.

    512 GitHub stars~1.3k tokensUpdated 1 mo ago
    MobileAuto-check passed
  • Frb Add Contributor

    fzyzcjy/flutter_rust_bridge

    Add or reconcile flutterrustbridge contributors through all-contributors PRs.

    5.4k GitHub stars~1.6k tokensUpdated yesterday
    MobileAuto-check passed
  • Liquid Glass Widgets

    sdegenaar/liquid_glass_widgets

    Mastery guide and architectural rules for liquidglasswidgets.

    711 GitHub stars~3.8k tokensUpdated yesterday
    MobileAuto-check passed

More from alnitak/flutter_soloud

All 14 skills in this repo
  • Flutter SoLoud Audio Filters

    alnitak/flutter_soloud

    Explains how to add and tune flutter_soloud's 13 audio filters at global, per-sound and mixing-bus level, including activation order and parameter fades.

    424 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • flutter_soloud Mixing Buses

    alnitak/flutter_soloud

    Teaches flutter_soloud mixing buses for routing groups of sounds through shared sub-mixes with collective volume and filters, such as separate music, SFX and UI sliders.

    424 GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • flutter_soloud Setup

    alnitak/flutter_soloud

    Walks through adding the flutter_soloud audio engine to a Flutter app, with per-platform setup, initialization, binary-size and logging options, and output device switching.

    424 GitHub stars~3.6k tokensUpdated today
    Auto-check: notes
  • Shows how to build audio visualizers in Flutter with flutter_soloud, using live FFT and wave data or offline waveform extraction, plus volume readings for level meters.

    424 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Flutter Soloud 3D Audio

    alnitak/flutter_soloud

    Teaches positional (3D) audio in fluttersoloud — play3d/play3dClocked/play3dScheduled, listener position/orientation/velocity, per-source attenuation and Doppler, and the per-frame update pattern.

    424 GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • flutter_soloud Idioms

    alnitak/flutter_soloud

    Explains the mental model for the flutter_soloud audio plugin: the SoLoud.instance singleton, AudioSource versus SoundHandle, synchronous play and platform limits.

    424 GitHub stars~2.3k tokensUpdated today
    Auto-check passed

Works with

Questions about flutter_soloud Push Buffer Streaming

What does flutter_soloud Push Buffer Streaming do?

Teaches the push buffer-stream API of flutter_soloud for playing audio that arrives in chunks, such as icecast radio, WebSocket PCM feeds or streaming TTS, instead of a complete file. The skill covers setBufferStream, addAudioDataStream and setDataIsEnded, the API for playing audio as it arrives rather than loading a complete file with loadFile, loadMem or loadUrl. An AudioSource is created with setBufferStream, chunks are pushed synchronously with addAudioDataStream from any isolate, and setDataIsEnded marks the stream complete so soundEvents can report playback completion.

When should I use flutter_soloud Push Buffer Streaming?

flutter_soloud Push Buffer Streaming fits situations like: playing audio from a WebSocket or icecast stream in a Flutter app; streaming TTS or LLM-generated audio as it is produced; playing procedurally generated PCM audio in real time.

How do I install flutter_soloud Push Buffer Streaming in Claude Code?

Run `npx skills add alnitak/flutter_soloud --skill flutter-soloud-streaming -a claude-code`. Or copy the skill folder (skills/flutter-soloud-streaming in alnitak/flutter_soloud) into .claude/skills/flutter-soloud-streaming in your project. Claude Code loads it when a task matches its description.

How do I install flutter_soloud Push Buffer Streaming in Codex?

Run `npx skills add alnitak/flutter_soloud --skill flutter-soloud-streaming -a codex`. Or copy the skill folder (skills/flutter-soloud-streaming in alnitak/flutter_soloud) into .agents/skills/flutter-soloud-streaming in your project. Codex loads it when a task matches its description.

Can I use flutter_soloud Push Buffer Streaming in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alnitak/flutter_soloud --skill flutter-soloud-streaming -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/flutter-soloud-streaming, .gemini/skills/flutter-soloud-streaming, .github/skills/flutter-soloud-streaming and .opencode/skills/flutter-soloud-streaming in your project.

What does flutter_soloud Push Buffer Streaming need to run?

Going by SKILL.md and its folder, flutter_soloud Push Buffer Streaming needs the command-line tools its instructions call (dart). Our summary lists: The flutter_soloud Flutter package.

Does flutter_soloud Push Buffer Streaming access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is flutter_soloud Push Buffer Streaming safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does flutter_soloud Push Buffer Streaming use?

flutter_soloud Push Buffer Streaming is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does flutter_soloud Push Buffer Streaming use?

About 2.5k tokens (SKILL.md is roughly 9.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.4k tokens, read only when the agent opens those files.

What are the alternatives to flutter_soloud Push Buffer Streaming?

Skills that share tags, products or a category with flutter_soloud Push Buffer Streaming: Generate Images With Firebase AI (evanca/flutter-ai-rules, 647 stars), Apple Design (vrcm-team/VRCM, 179 stars), Add Flutter Docusaurus Locale (matthiasn/lotti, 1.2k stars) and Flutter Pub Release (MixinNetwork/flutter-plugins, 512 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains flutter_soloud Push Buffer Streaming?

alnitak (a GitHub user) maintains it in alnitak/flutter_soloud, which has 424 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 6, 2026.

Source: alnitak/flutter_soloud on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.