2 Design Principles
Phil Schatzmann edited this page 2024-06-16 10:32:57 +02:00

This project is guided by the following goals:

  • Use a Header only implementation (so that there is no need for any compiled static or dynamic library).

  • Use base concept of Arduino Streams to read and write Audio Data, so that we can easily use the existing Arduino classes as input or output

  • Provide a comprehensive and complete set of audio related functionality

  • Separate between Basic Functionality and Extended Functionality

    • Provide all basic classes by importing "AudioTools.h":
    • Extended functionality which relies on external libraries needs to be imported separately:
  • Separate between basic API (e.g I2SStream) and platform specific driver classes: Platform specific differences are handled in AudioConfig.h where you can configure, activate or deactivate specific functionality.

  • Try to be as platform independent as possible:

    • If compiled outside of Arduino use our own Stream and Print implementation
    • Avoid any other Arduino or C++ data structures that might not be available in all platforms (e.g. Arduino String, c++ string)
    • Use the AudioConfig.h to define global parameters and platform specific differences
  • Support cmake so that software can be built on the desktop and other platforms