Agent skill

Flutter Soloud Pull Streaming

by alnitak in alnitak/flutter_soloud

Teaches the pull-buffer streaming API of the fluttersoloud audio plugin — setPullBufferStream with its onMoreDataIsNeeded callback, addPullBufferDataStream with byte offsets, seek via engine…

MITAuto-check: notesMobile

Install Flutter Soloud Pull Streaming

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

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

GitHub CLI
$ gh skill install alnitak/flutter_soloud flutter-soloud-pull-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-pull-streaming .claude/skills/flutter-soloud-pull-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-pull-streaming
GitHub stars
424
Token cost
~2.8k tokens
SKILL.md length
1,046 words
Files
1
Skills in repo
14
Repo updated
First seen
Licence
MIT

At a glance

Teaches the pull-buffer streaming API of the fluttersoloud audio plugin — setPullBufferStream with its onMoreDataIsNeeded callback, addPullBufferDataStream with byte offsets, seek via engine…

  • The user asks to stream a large remote/local audio file with seeking
  • SKILL.md covers Minimal example, The API shape, Pull vs push and Traps, plus 2 more sections
  • Calls dart and apt
  • Play multi-GB audio without loading it into memory

What it does

Flutter Soloud Pull Streaming is an agent skill from alnitak/flutter_soloud. Teaches the pull-buffer streaming API of the fluttersoloud audio plugin — setPullBufferStream with its onMoreDataIsNeeded callback, addPullBufferDataStream with byte offsets, seek via engine re-requests, and bounded-memory playback of huge seekable sources (HTTP range requests, large files). Use when the user asks to stream a large remote/local audio file with seeking, play multi-GB audio without loading it into memory, or is deciding between push (setBufferStream) and pull streaming.

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile, covering Cross-platform mobile apps. It works with Flutter. The repository describes itself as: Flutter low-level audio plugin using SoLoud C++ library and FFI. The licence is MIT.

When your agent uses it

  • The user asks to stream a large remote/local audio file with seeking
  • Play multi-GB audio without loading it into memory
  • Is deciding between push (setBufferStream) and pull streaming

Example prompts

  • “Use the flutter-soloud-pull-streaming skill to teach the pull-buffer streaming API of the fluttersoloud audio plugin — setPullBufferStream with its…”
  • “/flutter-soloud-pull-streaming”

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
    • apt

    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 Pull Streaming loads about 2.8k tokens when it runs. Until then it costs about 130 tokens; SKILL.md has 1,046 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~130
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteRuns commands with sudoSKILL.md:105
    vformat`) installed on the host system (`sudo apt install ffmpeg libavcodec-extra`, `sudo pacman -S ffmpeg`, etc.). Core

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). 1,046 words, ~2,775 tokens.

Download SKILL.mdSave it as .claude/skills/flutter-soloud-pull-streaming/SKILL.md (or your agent's skills folder).
name
flutter-soloud-pull-streaming
description
Teaches the pull-buffer streaming API of the flutter_soloud audio plugin — setPullBufferStream with its onMoreDataIsNeeded callback, addPullBufferDataStream with byte offsets, seek via engine re-requests, and bounded-memory playback of huge seekable sources (HTTP range requests, large files). Use when the user asks to stream a large remote/local audio file with seeking, play multi-GB audio without loading it into memory, or is deciding between push (setBufferStream) and pull streaming.
version
2

flutter_soloud pull-buffer streaming

In flutter_soloud, "pull" streaming means the engine owns the data demand: you create an AudioSource with setPullBufferStream(...) declaring the total encoded size, and the engine calls your onMoreDataIsNeeded(offset) callback whenever it wants the next chunk of encoded bytes at a specific byte offset. You fetch the bytes (HTTP Range request, file read, decryptor, custom protocol) and hand them back via addPullBufferDataStream. Decoded audio lives in a fixed-size circular buffer, so memory stays bounded regardless of source size — a 10 GB file can play with a 5 MB buffer. Seeking works: after SoLoud.instance.seek(handle, pos), the engine re-issues onMoreDataIsNeeded at the byte offset for the new position. One pull stream = one playback voice.

Minimal example

dart
import 'package:flutter/foundation.dart';
import 'package:flutter_soloud/flutter_soloud.dart';

Future<void> playHugeFile(
  Uint8List Function(int offset, int length) fetchRange,
  int totalBytes,
) async {
  await SoLoud.instance.init(); // must complete before any other call

  // Declare first: the callback closure must reference the source, and a
  // local can't be referenced inside its own initializer.
  late final AudioSource source;
  source = SoLoud.instance.setPullBufferStream(
    audioSizeBytes: totalBytes, // REQUIRED, non-zero, known upfront
    bufferSizeBytes: 5 * 1024 * 1024, // decoded circular buffer, ~14 s stereo f32
    bufferTriggerPosition: 0.8, // default; ask for more when 20% ahead remains
    format: BufferType.auto, // default; detects MP3, WAV, FLAC, OGG, AAC, AC-3, E-AC-3
    onAudioDuration: (seconds) {/* total duration is now known */},
    onMetadata: (metadata) {/* detected format, sample rate, channels */},
    onMoreDataIsNeeded: (offset) {
      const chunkSize = 64 * 1024;
      final end = (offset + chunkSize).clamp(0, totalBytes);
      if (offset < 0 || offset >= totalBytes) return;
      SoLoud.instance.addPullBufferDataStream(
        source,
        fetchRange(offset, end - offset),
        offset: offset,
      );
    },
  );

  final handle = SoLoud.instance.play(source);

  // Seeking is free: the engine re-requests data at the new offset.
  SoLoud.instance.seek(handle, const Duration(minutes: 2));

  // No end-of-stream call exists: when sequential data reaches
  // audioSizeBytes the engine ends the stream itself.
  // Dispose on teardown: SoLoud.instance.deinit();
}

The API shape

All on SoLoud.instance (lib/src/soloud.dart). Real signatures:

dart
AudioSource setPullBufferStream({
  int bufferSizeBytes = 1024 * 1024 * 10, // 10 MB
  double bufferTriggerPosition = 0.8,
  int sampleRate = 44100,
  Channels channels = Channels.stereo,
  BufferType format = BufferType.auto,
  int audioSizeBytes = 0,        // 0 throws SoLoudCppException(invalidParameter)
  bool autoDispose = false,
  void Function(bool isBuffering, int handle, double time)? onBuffering,
  void Function(AudioMetadata)? onMetadata,
  void Function(double duration)? onAudioDuration,
  void Function(int offset)? onMoreDataIsNeeded,
});

void resetPullBufferStream(AudioSource sound);

PlayerErrors addPullBufferDataStream(
  AudioSource source,
  Uint8List audioChunk, {
  int offset = 0, // byte offset in the ENCODED stream
});

({PlayerErrors error, Duration startTime, Duration endTime})
  getPullBufferTimeRange(AudioSource source);
  • setPullBufferStream returns an AudioSource synchronously (unlike loadAsset/loadFile, which are async) and throws SoLoudCppException on error. Play it with the usual synchronous SoLoud.instance.play(source).
  • audioSizeBytes is the total size of the encoded source and is mandatory upfront (server Content-Length, file length). It drives duration calculation and end-of-stream detection; for Ogg formats the engine also uses it to request the tail chunk for duration probing.
  • bufferTriggerPosition is about how much decoded audio remains ahead of the playhead, not absolute fill level: 0.8 fires the request when the playhead is within the last 20% of the decoded window. Values outside [0.0, 1.0] are clamped.
  • sampleRate/channels are ignored when format is BufferType.auto (the common case); they only matter for raw PCM formats (f32le, s8, s16le, s32le).
  • addPullBufferDataStream takes a named offset. offset: 0 means "append the next sequential chunk" — always pass the real requested offset from the callback instead. Empty chunks are a no-op returning PlayerErrors.noError.
  • getPullBufferTimeRange returns the decoded window currently in the circular buffer as Durations; the playhead normally sits near startTime. Use it to render a buffered-range indicator and to detect "smart" seeks (target inside the window = no refetch needed).
  • Divergence from audioplayers/just_audio: there is no setUrl, no player.durationStream, no AudioSource.uri. Duration arrives asynchronously through the onAudioDuration callback (seconds as double), and position is polled with SoLoud.instance.getPosition(handle). There is no Source object per URL — you are the transport.

Pull vs push

flutter_soloud has two streaming APIs; pick by source shape:

  • Pull (setPullBufferStream) — the source is seekable/addressable and you know its size: HTTP servers with Range support, local files, encrypted containers. Supports arbitrary seek and bounded memory. This skill.
  • Push (setBufferStream + addAudioDataStream + setDataIsEnded) — data arrives sequentially with no random access: live radio, microphone feeds, procedurally generated audio. See the sibling skill flutter-soloud-streaming.

Traps

  • MP4 and M4A containers are NOT supported for streaming. While MP4/M4A audio files are supported for whole-file loading (loadFile/loadAsset/loadMem), streaming chunks from MP4/M4A containers is not supported. Use streamable elementary formats (AAC ADTS, AC-3, E-AC-3, OGG, MP3, WAV, or raw PCM).
  • Linux requirement for AAC / AC-3 / E-AC-3. On Linux, streaming these formats requires FFmpeg shared libraries (libavcodec and libavformat) installed on the host system (sudo apt install ffmpeg libavcodec-extra, sudo pacman -S ffmpeg, etc.). Core formats (MP3, WAV, FLAC, OGG) work without FFmpeg.
  • Web browser limitation for AC-3 / E-AC-3. AC-3 and E-AC-3 streaming is not supported on the Web platform in any browser. Chrome and Firefox lack Dolby licensing, and Safari's WebCodecs engine rejects raw AC-3 elementary stream frames. AC-3 and E-AC-3 streaming is supported only on native platforms (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.
  • audioSizeBytes of 0 throws. setPullBufferStream calls SoLoudCppException.fromPlayerError(PlayerErrors.invalidParameter) when it is 0. Do a HEAD request / stat the file first. A server that omits Content-Length and Accept-Ranges: bytes is a poor fit for pull.
  • Do not invent an end-of-stream call. There is no setDataIsEnded for pull streams (that belongs to the push API). The stream ends automatically once sequential data reaches audioSizeBytes.
  • The callback can re-fire for the same offset and fire out of order. Deduplicate in-flight requests (_pendingOffsets.add(offset) pattern) and guard offset < 0 || offset >= audioSizeBytes — the engine may probe the tail for Ogg duration. addPullBufferDataStream accepts out-of-order chunks precisely for this.
  • Seek invalidates your dedup state. After an out-of-buffer seek(handle, pos), the engine re-requests offsets you may have already served. Clear your "already fetched" set on such seeks, or the re-requested bytes never arrive and playback stalls silently. Seeks inside the current getPullBufferTimeRange window are free and need no refetch.
  • One voice per stream. A pull AudioSource is tied to a single playing instance; create a new stream for a new voice. PlayerErrors.invalidPullBufferState / hashIsNotAPullBufferStream mean you called a pull method on the wrong source or at the wrong time.
  • Web: replacing a stream. Disposing the old pull source while the audio thread still processes it can crash/deadlock. The example works around this by leaving the old source in the engine and letting callbacks capture their own currentSource, dropping callbacks whose source is stale (currentSource != _source). Web also requires the server to send CORS headers for Range requests.
  • Chunk size is yours to choose. The engine only tells you where, not how much. ~64 KB keeps HTTP overhead reasonable and the trigger firing; chunks larger than the whole file defeat the pull model (everything decodes in the first callback).
  • Playhead lives at the buffer's edge. The decoded window slides forward; the playhead stays near startTime, not centered in a large pre-buffered region. Don't design UX around a just_audio-style bufferedPosition far ahead of playback.
  • Errors from addPullBufferDataStream throw. It returns PlayerErrors but throws SoLoudCppException on any non-noError result — wrap feeds in try/catch and stop feeding a broken stream.
Show full SKILL.md (126 more words)Show less

More depth

Full working demos in the plugin repo under example/lib/pull_buffer/:

  • http_range_stream.dart — HTTP Range-request streaming with HEAD-based size discovery, offset dedup, smart-seek detection.
  • file_stream.dart — streaming a huge local file/asset in chunks; shows the stale-callback guard pattern for web.
  • seek_bar.dart — PullBufferSeekBar widget visualizing the sliding decoded window from getPullBufferTimeRange.

Reference doc: docs/advanced/pull_buffer_streaming.mdx (flutter_soloud_docs repo). Tests worth reading for edge cases: example/tests/tests/pull_buffer_seek_test.dart, pull_buffer_in_buffer_seek_test.dart, pull_buffer_range_test.dart.

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

Just SKILL.md in skills/flutter-soloud-pull-streaming of alnitak/flutter_soloud.

Open the folder on GitHubat commit 289697e

Compare with similar skills

Flutter Soloud Pull 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 Pull Streaming compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Flutter Soloud Pull Streaming this skillalnitak/flutter_soloud424—~2.8kAutomated safety check: NotesMIT
Add Flutter Docusaurus Localematthiasn/lotti1.2k—~1.2kAutomated safety check: PassGPL-3.0
Tm Launcher DesignFar-Se/tabame371—~3.1kAutomated safety check: PassMIT
Mobile App UI Designceorkm/mobile-app-ui-design400—~2kAutomated safety check: PassNone
Marionette Flutter Drive Appleancodepl/marionette_mcp473—~11kAutomated safety check: PassApache-2.0
Flutter ScreenshotJustLookAtNow/pt_mate503—~511Automated safety check: PassMIT

Similar skills

  • 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
  • Tm Launcher Design

    Far-Se/tabame

    Create or revise Tabame's Flutter launcher designs: frames, search bars, result rows, palettes, typography, and action dialogs.

    371 GitHub stars~3.1k tokensUpdated yesterday
    MobileAuto-check passed
  • Mobile App UI Design

    ceorkm/mobile-app-ui-design

    Design high-quality mobile app UI/UX screens, flows, and components.

    400 GitHub stars~2k tokensUpdated 3 mo ago
    MobileAuto-check passed
  • Marionette Flutter Drive App

    leancodepl/marionette_mcp

    Set up and drive a running Flutter app (debug or profile) with Marionette — an AI agent's hands and eyes for the app.

    473 GitHub stars~11k tokensUpdated 2 days ago
    MobileAuto-check passed
  • Flutter Screenshot

    JustLookAtNow/pt_mate

    Capture and show two Flutter UI screenshots for this project: one landscape/large-screen preview and one portrait/mobile preview, without using Flutter Web.

    503 GitHub stars~511 tokensUpdated 2 days ago
    MobileAuto-check passed
  • Flutter Init

    bear2u/my-skills

    A skill your agent uses when user wants to create a new Flutter project (Todo/Habit/Note/Expense/Custom domain) with Clean Architecture, Riverpod 3.0, Drift, and modern Flutter stack

    933 GitHub stars~2.5k tokensUpdated 3 mo ago
    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 yesterday
    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 yesterday
    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 yesterday
    Auto-check: notes
  • 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.

    424 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • 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 yesterday
    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 yesterday
    Auto-check passed

Works with

Categories

Questions about Flutter Soloud Pull Streaming

What does Flutter Soloud Pull Streaming do?

Teaches the pull-buffer streaming API of the fluttersoloud audio plugin — setPullBufferStream with its onMoreDataIsNeeded callback, addPullBufferDataStream with byte offsets, seek via engine…. Flutter Soloud Pull Streaming is an agent skill from alnitak/flutter_soloud. Teaches the pull-buffer streaming API of the fluttersoloud audio plugin — setPullBufferStream with its onMoreDataIsNeeded callback, addPullBufferDataStream with byte offsets, seek via engine re-requests, and bounded-memory playback of huge seekable sources (HTTP range requests, large files).

When should I use Flutter Soloud Pull Streaming?

Flutter Soloud Pull Streaming fits situations like: the user asks to stream a large remote/local audio file with seeking; play multi-GB audio without loading it into memory; is deciding between push (setBufferStream) and pull streaming.

How do I install Flutter Soloud Pull Streaming in Claude Code?

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

How do I install Flutter Soloud Pull Streaming in Codex?

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

Can I use Flutter Soloud Pull 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-pull-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-pull-streaming, .gemini/skills/flutter-soloud-pull-streaming, .github/skills/flutter-soloud-pull-streaming and .opencode/skills/flutter-soloud-pull-streaming in your project.

What does Flutter Soloud Pull Streaming need to run?

Going by SKILL.md and its folder, Flutter Soloud Pull Streaming needs the command-line tools its instructions call (dart and apt).

Does Flutter Soloud Pull 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 Pull Streaming safe to install?

Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Flutter Soloud Pull Streaming use?

Flutter Soloud Pull 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 Pull Streaming use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Flutter Soloud Pull Streaming?

Skills that share tags, products or a category with Flutter Soloud Pull Streaming: Add Flutter Docusaurus Locale (matthiasn/lotti, 1.2k stars), Tm Launcher Design (Far-Se/tabame, 371 stars), Mobile App UI Design (ceorkm/mobile-app-ui-design, 400 stars) and Marionette Flutter Drive App (leancodepl/marionette_mcp, 473 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Flutter Soloud Pull 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.