# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.0.0] - 2026-09-03

### Added

- Add the audio testing library `com.microej.pack.audio:audio-testing`.

### Changed

- Change Ogg Vorbis audio format constructor to create an OggVorbisAudioFormat with specified sample rate and number of channels.
- Add Ogg Vorbis and Ogg Vorbis mock to specific modules.

## [2.1.0] - 2026-06-05

### Added

- Add an audio testsuite. The device plays audio files provided by an HTTP server and the server determines if the played audio matches the reference files.
- Run the audio testsuite on a Linux VEE Port with an implementation of the audio foundation library.
- Allow sending the played audio stream as PCM over a TCP connection, enabling testing or recording of the audio stream.

### Fixed

- Audio mock G711 decoder: wrong parameter used to define the number of channels

## [2.0.0] - 2026-03-30

### Added

- Audio mock: Decoders can now be loaded from other mocks by registering with the AudioDecoderLoader service provider.
- AudioMp3: added kernel.api file to the module.

### Changed

- Move AudioDecoder interface to the new audio-mock-decoder module.
- Change MP3 audio format constructor to create an MP3AudioFormat with specified sample rate and number of channels.
- Move Mp3 and Mp3 mock in dedicated modules.
- Throw an exception if a PcmAudioFormat() is created with a bitDepth argument different from 8, 16, 24 or 32.
- Add PCM 24bit support in mock.
- Rename AudioTrack to AudioSink and AudioRecord to AudioSource.
- Move Audio Kernel API and testsuite to Audio Pack.
- Publish all modules with the root project's CHANGELOG file.
- Update Pack to SDK 6 `1.6.0`.

## [1.6.0] - 2025-12-04

### Added

- Allow AudioDecoders to reset their output format in mocks.

### Changed

- Audio mock: AudioDecoder.getNextFrame now throws an IOException instead of returning null on error.

### Fixed

- Audio mock Ogg decoder: Avoid usage of a closed line due to concurrent access. It could caused
  `illegal request to write non-integral number of frames`.

## [1.5.0] - 2025-11-26

### Added

- Another mock can override the default audio track by setting the system property
  `microej.internal.mock.audio.track.impl`
  to the FQN of an `ej.audio.track.MockAudioTrack` implementation.

### Changed

- Migrate to SDK 6.

## [1.4.1] - 2025-09-24

### Fixed

- Use PCM 16 bits signed for G711 decoder instead of unsigned (make it compatible with ALSA Linux sound driver).

## [1.4.0] - 2025-09-02

### Added

- Add `G711AudioFormat`.

### Changed

- Use default audio device when none selected.

### Fixed

- Fix issue when a device generates 2 mixers with the same name.

## [1.3.1] - 2025-08-12

### Changed

- Support writing multiple independent Base64 payloads to the same audio track on Simulator.

### Fixed

- Fix missing trace event end when record/track `open()` native throws a `NativeIOException`.

## [1.3.0] - 2025-07-09

### Added

- Implement new APIs of Audio API 1.3.
- Check permission when creating and accessing `AudioRecord` and `AudioTrack`.
- Support Base64 decoding and encoding in mock.
- Add debug traces.

### Fixed

- Fix `AudioTrack.writeBuffer()` blocking indefinitely on Simulator if data cannot be decoded.

## [1.2.1] - 2025-04-28

### Fixed

- Fix MP3 decoding issue in mock when decoding some MP3 files.

## [1.2.0] - 2025-04-03

### Added

- Implement new APIs of Audio API 1.2.
- Add defines for MP3 and Ogg Vorbis encodings in LLAPI.
- Support Ogg Vorbis decoding in mock.

## [1.1.0] - 2025-02-06

### Added

- Implement new APIs of Audio API 1.1.
- Support MP3 decoding in mock.

### Changed

- Improve accuracy of blocking operation delays in mock.

## [1.0.0] - 2024-09-30

### Added

- Add implementation for APIs of Audio API 1.0.
- Add LLAPI.
- Add mock.
- Add VEE Port init scripts.

---
_Copyright 2024-2026 MicroEJ Corp. All rights reserved._
_This library is provided in source code for use, modification and test, subject to license terms._
_Any modification of the source code will break MicroEJ Corp. warranties on the whole library._
