opus_codec_platform_interface 3.0.5
opus_codec_platform_interface: ^3.0.5 copied to clipboard
A common platform interface for the opus_codec plugin.
3.0.5 #
Bug Fixes #
- Fix output buffer sizing for
BufferedOpusDecoder(was 4x too small for float output) and inverted multiplier inStreamOpusDecoder - Fix
opus_encoder_ctlvariadic ABI mismatch under WASM by adding a non-variadic C wrapper - Prevent
asTypedListview detachment on WASM memory growth by returning Dart-heap copies - Always copy streaming output to the Dart heap, eliminating use-after-write hazards in
StreamOpusEncoderandStreamOpusDecoder - Guard encoder/decoder methods against use after
destroy()withOpusDestroyedError - Attach
Finalizerto encoder/decoder classes for GC-driven native resource cleanup - Prevent memory leak when a second native allocation throws
- Add
_asStringbounds guard (cap at 256 bytes) to prevent unbounded scanning - Register missing
OpusCustomModeopaque type ininit_web.dart(was duplicatingOpusRepacketizer) - Export
_opus_encoder_ctlin WASM DockerfileEXPORTED_FUNCTIONS
Refactoring #
- Extract duplicated encode logic into
_createOpusEncoderand_doEncode/_encodeBufferhelpers - Extract duplicated decode logic into shared helpers and replace magic numbers with named constants
- Deduplicate
OpusPacketUtilswith a shared_withNativePackethelper - Simplify
getOpusVersionimplementation - Add
bytesPerInt16SampleandbytesPerFloatSampleconstants inopus_dart_misc.dart
Chores #
- Add
repositoryfield to pubspec andCHANGELOG.md - Fix typos across comments and documentation
- Add RFC 6716 validation note to
maxDataBytes - Add comprehensive tests for buffer sizing, bounds checking, use-after-destroy, and allocation failure cleanup
3.0.4 #
- Bump version
3.0.3 #
- Depend on newer
wasm_ffiversion for web support
3.0.2 #
- libopus 1.3.1
3.0.1 #
- libopus 1.3.1
2.0.1 #
- libopus 1.3.1
- Minor formatting fixes
2.0.0 #
- libopus 1.3.1
- Null safety support
1.0.4 #
- libopus 1.3.1
1.0.3 #
- libopus 1.3.1
1.0.0 #
- libopus 1.3.1
- Initial release