Skip to content

Refactor/internal tools#932

Merged
maciejmakowski2003 merged 32 commits intomainfrom
refactor/internal-tools
Feb 9, 2026
Merged

Refactor/internal tools#932
maciejmakowski2003 merged 32 commits intomainfrom
refactor/internal-tools

Conversation

@maciejmakowski2003
Copy link
Collaborator

@maciejmakowski2003 maciejmakowski2003 commented Feb 2, 2026

Closes #

⚠️ Breaking changes ⚠️

  • Changed signature for CustomAudioProcessor methods in template

Introduced changes

  • Refactored AudioArray and AudioBus.
  • Merged AudioBus and AudioBuffer into one class

Main goal of above changes is to introduce some kind of unification in operating on audio data. From today we should only use AudioArray as an abstraction over pcm channel data and AudioBuffer as vector of channels.

Rules:

  • Do not break the chain -> operate over AudioArray / AudioBuffer.
  • Raw float pointer can be used only while integrating with external systems/services/interfaces like: JSI, native player, native recorder, decoders, encoders etc.
  • Do not create other data structures without prior checking whether any existing can be used directly or as a parent class.

Checklist

  • Linked relevant issue
  • Updated relevant documentation
  • Added/Conducted relevant tests
  • Performed self-review of the code
  • Updated Web Audio API coverage
  • Added support for web
  • Updated old arch android spec file

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR performs a major internal refactoring of the audio utilities layer, consolidating the dual-class AudioBus/AudioBuffer system into a single AudioBuffer class and modernizing the AudioArray implementation. The changes improve memory safety through smart pointers, add modern C++ features like spans and move semantics, and convert several utility classes to header-only implementations for better optimization.

Changes:

  • Renamed AudioBus to AudioBuffer throughout the entire codebase
  • Enhanced AudioArray with move semantics, span support, iterator support, and new utility methods
  • Introduced AudioArrayBuffer as a JSI-compatible buffer type
  • Converted Windows, AudioUtils, and ParamChangeEvent to header-only implementations
  • Modernized memory management from raw pointers to smart pointers

Reviewed changes

Copilot reviewed 125 out of 125 changed files in this pull request and generated no comments.

Show a summary per file
File Description
AudioBuffer.h/cpp New consolidated audio buffer implementation with improved API
AudioArray.h/cpp Enhanced with modern C++, span support, and additional utility methods
AudioArrayBuffer.hpp New JSI-compatible buffer adapter
All *Node files Updated to use AudioBuffer and reference-based APIs
Test files Updated to use new span-based APIs
Windows.hpp Converted to header-only with span support
AudioUtils.hpp Converted to header-only with inline implementations
ParamChangeEvent.hpp Converted to header-only with inline constructor

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@maciejmakowski2003 maciejmakowski2003 marked this pull request as ready for review February 5, 2026 07:48
Copy link
Contributor

@poneciak57 poneciak57 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job 👍

@maciejmakowski2003 maciejmakowski2003 merged commit 3215269 into main Feb 9, 2026
4 checks passed
@maciejmakowski2003 maciejmakowski2003 deleted the refactor/internal-tools branch February 9, 2026 11:16
@maciejmakowski2003 maciejmakowski2003 self-assigned this Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants