android-audio

command
v1.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2026 License: BSD-3-Clause Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command android-audio is a development example (step 31.6): a Material page that plays a 440 Hz tone through the public audio package and, besides, through a device of the platform's own (to read the AAudio stream's timestamp, which the public package does not show), and logs what the audio does twice a second. The device tests start it on the emulator and check that the callbacks run, that the timestamps advance, that the stream pauses when the app is hidden and goes on when it is shown, and that a recording asks for the permission. It may use internal packages, and runs where there is an audio service (the stats are for Android only).

The log lines (the default logger's, so "INFO " comes first):

audio state state=<running|paused|lost|closed>
audio stats public=<frames played by the public device> platform=<fills of the platform's device> frame=<n> nanos=<n> ts=<bool> ...
audio capture failed err=<tag>
audio capture frames=<n>

GLUTTER_AUDIO_CAPTURE=1 also opens a recording device. Run it on a device or the emulator with:

go run ./cmd/glutter-android run -permission android.permission.RECORD_AUDIO ./examples/dev/android-audio

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL