glint_audio 0.10.0 copy "glint_audio: ^0.10.0" to clipboard
glint_audio: ^0.10.0 copied to clipboard

Dart FFI bindings for the glint MP3, AAC-LC, Opus, Ogg-Vorbis, WAV and resampling codec suite.

glint_audio #

Dart FFI bindings for the glint codec suite.

The package exposes MP3, AAC-LC and Opus encode/decode APIs, whole-file decode and encode helpers, WAV read/write helpers, and a Kaiser-windowed sinc resampler. It loads the native glint library at runtime:

  • Linux and Android: libglint.so
  • macOS: libglint.dylib
  • Windows: glint.dll
  • iOS: symbols from the process image

This package does not ship prebuilt native libraries. Build or bundle the native library from the glint repository for the target platform before using the Dart bindings.

Usage #

import 'dart:typed_data';

import 'package:glint_audio/glint_audio.dart';

final pcm = Float32List(48000 * 2); // interleaved stereo, +/-1.0

final opus = glintEncodeAudio(
  pcm,
  2,
  48000,
  GlintCodec.opus,
  bitrate: 96000,
);

final decoded = glintDecodeAudio(opus);
final wav = glintWriteWav(decoded.pcm, decoded.channels, decoded.sampleRate);

For lower-level streaming APIs, use GlintEncoder, GlintAacEncoder, GlintOpusEncoder, GlintOpusDecoder, GlintMp3Decoder and GlintAacDecoder.

License #

MIT. See LICENSE.

0
likes
160
points
176
downloads

Documentation

API reference

Publisher

verified publishercrispstro.be

Weekly Downloads

Dart FFI bindings for the glint MP3, AAC-LC, Opus, Ogg-Vorbis, WAV and resampling codec suite.

Homepage
Repository (GitHub)
View/report issues

Topics

#audio #mp3 #aac #opus #vorbis

License

MIT (license)

Dependencies

ffi

More

Packages that depend on glint_audio