audio_adapters library

Native audio backends for consona_flutter (audioplayers + record).

Import this barrel only when you need real playback / mic capture. Core engines default to silent mocks without these adapters.

Classes

AudioplayersAudioBackend
Production AudioBackend backed by audioplayers.
AudioplayersSoundPlayer
Concrete SoundPlayer adapter using audioplayers to play synthesized PCM WAV bytes.
RecordAudioRecorderBackend
Mic-backed AudioRecorderBackend using the record package.

Functions

buildDemoToneWav({double frequency = 220.0, double durationMs = 2400.0, double gain = 0.22}) → Uint8List
createRecorderBackend({int sampleRate = 48000, Duration maxDuration = const Duration(minutes: 10)}) → Future<AudioRecorderBackend>
Returns a RecordAudioRecorderBackend when the native plugin responds, otherwise MockAudioRecorderBackend (simulator / stale binary / desktop).