Sign in Get 3 free credits

Try a job or a niche: tiktok captions, study notes, excel formulas. Press Esc to close.

Flutter audio scheduling

Schedules flutter_soloud sounds to the exact sample with low latency, so game and music audio stay in time.

Claude's review

8/10 Precise low latency scheduling guidance with working patterns and API caveats.

We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.

In detail

Teaches sample-accurate audio scheduling and ultra-low-latency playback in flutter_soloud with playScheduled (absolute engine-time scheduling, sample-accurate auto-stop, and retroactive render-ahead remixing for lowest possible latency) and playClocked (sounds anchored to a running "physics time" clock without buffer-clumping), their repeatEvery argument (one voice that repeats a sound at a fixed period, placed by the engine on the exact sample, ended with stop or stopRepeating), plus clock helpers getEngineTime/getPlayheadTime/getOutputLatency/getHardwareOutputLatency/resetStreamTime and stopScheduled/fadeScheduled. Use when the user asks for the same sound repeated on a cadence in a game (automatic gunfire, gunshots, footsteps, engine ticks) or plays sounds from Timer.periodic or the game loop, for lowest possible latency on click/tap/button press, a metronome, step sequencer, rhythm game, pre-computed music timeline/score, visuals synced to audio, or complains that sounds have latency or periodic play() ca

How you use it

  1. Add it to your pack, then download your pack (1 credit).
  2. In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
  3. Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide

Safety check

Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.

An automated scan lowers risk but cannot promise zero risk. How we check skills

Preview

The first lines of SKILL.md
---
name: flutter-soloud-scheduling
version: 5
description: Teaches sample-accurate audio scheduling and ultra-low-latency playback in flutter_soloud with playScheduled (absolute engine-time scheduling, sample-accurate auto-stop, and retroactive render-ahead remixing for lowest possible latency) and playClocked (sounds anchored to a running "physics time" clock without buffer-clumping), their repeatEvery argument (one voice that repeats a sound at a fixed period, placed by the engine on the exact sample, ended with stop or stopRepeating), plus clock helpers getEngineTime/getPlayheadTime/getOutputLatency/getHardwareOutputLatency/resetStreamTime and stopScheduled/fadeScheduled. Use when the user asks for the same sound repeated on a cadence in a game (automatic gunfire, gunshots, footsteps, engine ticks) or plays sounds from Timer.periodic or the game loop, for lowest possible latency on click/tap/button press, a metronome, step sequencer, rhythm game, pre-computed music timeline/score, visuals synced to audio, or complains that sounds have latency or periodic play() calls clump or drift.
---

# Sample-accurate scheduling & Ultra-low latency

Plain `SoLoud.instance.play()` starts a sound at the **next output buffer boundary**: everything launched within the same buffer starts at the exact same sample ("clumps"), and reactive playback waits up to one full buffer size (~46 ms at the default 2048-sample buffer / 44100 Hz). flutter_soloud solves both latency and clumping with two scheduling APIs combined with the native render-ahead ring:

- `playScheduled(sound, atTime, {duration, ...})` — absolute time on the **engine's own clock** (`getEngineTime()`), schedulable arbitrarily far ahead; optional `duration` gives a sample-accurate auto-stop. **For the lowest possible latency on user input (button clicks/keypresses)**, pass `atTime: Duration.zero` (or past engine time) with `renderAheadFrames`: the voice is retroactively remixed into the unconsumed ring buffer at the hardware playhead (~11 ms with `devicePeriodFrames: 512`), bypassing buffer-boundary waits.
- `playClocked(sound, soundTime, ...)` — you feed your own monotonically increasing "physics time"; the first call anchors it to the audio clock with a built-in ~2-output-buffer lead, subsequent calls are placed relative to that anchor. Best for evenly spaced, rapid repeated clicks/SFX driven by your own loop or rapid user tapping without clumping (metronome, machine-gun fire, footsteps).
- `repeatEvery: Duration` on either of them (and on `play3dClocked` / `play3dScheduled`) — **one call for a whole burst**: one voice starts the sound again at that period until it is stopped, each pass on its exact sample. No timer, game loop or frame rate is in the timing path. `stopRepeating(handle)` ends it and lets the last passes ring out.

## Minimal examples

### Lowest possible latency on button click (reactive playback)

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

Future<void> main() async {
  // 1. Configure the render-ahead ring for hardware-level latency (~11.6 ms at 44.1 kHz)
  await SoLoud.instance.init(
    bufferSize: 2048,
    renderAheadFrames: 2048, // enables retroactive remixing into the ring buffer
    devicePeriodFrames: 512, // hardware device period
  );

  final clickSound = await SoLoud.instance.loadAsset('assets/click.wav');

  // 2. In your button / tap callback:
  // Passing Duration.zero (or past engine time) plays immediately at the playhead
  // via retroactive remixing, with the lowest possible latency.
  SoLoud.instance.playScheduled(clickSound, Duration.zero);
}
```

### Automatic fire with one call: `repeatEvery`

...

From alnitak's repository, MIT licence.

Related skills

  • Checked

    Flutter positional audio

    Adds positional 3D sound to Flutter apps with flutter_soloud, so effects shift and fade as things move around.

    by alnitak 427
    8/101 credit
  • Checked

    Flutter SoLoud audio

    Explains how to use the flutter_soloud audio plugin correctly and which feature fits each game sound problem.

    by alnitak 427
    7/101 credit
  • Checked

    Game Audio Mixing

    Sets up game audio buses, volume sliders, music ducking and adaptive music for Godot, Unity or FMOD.

    by gamedev-skills 13k
    8/101 credit
  • Checked

    Godot game audio

    Wires up sound effects, music and volume sliders in Godot and fixes sounds that go silent or will not loop.

    by gamedev-skills 13k
    8/101 credit
  • Checked

    melonJS Game Audio

    Adds sound effects, music and positional audio to melonJS browser games, and fixes silent or stuck sound.

    by melonjs 6.5k
    8/101 credit
  • Checked

    Podcast show notes

    Turns a podcast transcript into search friendly show notes with timestamps, key quotes and social captions.

    by calebvbi
    7/101 credit

Secure checkout

Credits

AUD

  1. 1Choose
  2. 2Pay on Square
  3. 3Credits added