Arduino A2DP

Public Member Functions | List of all members
SoundData Class Referenceabstract
ESP32 A2DP

Sound data as byte stream. We support TwoChannelSoundData (uint16_t + uint16_t) and OneChannelSoundData which stores the data as array of uint16_t We provide the complete sound data as a simple c array which can be prepared e.g. in the following way. More...

`#include <SoundData.h>`

Inheritance diagram for SoundData:

## Public Member Functions
bool | doLoop ()
virtual int32_t | get2ChannelData (int32_t pos, int32_t len, uint8_t *data)=0
virtual int32_t | getData (int32_t pos, Frame &channels)=0
virtual void | setDataRaw (uint8_t *data, int32_t len)=0
void | setLoop (bool loop)

## Detailed Description

Sound data as byte stream. We support TwoChannelSoundData (uint16_t + uint16_t) and OneChannelSoundData which stores the data as array of uint16_t We provide the complete sound data as a simple c array which can be prepared e.g. in the following way.

- Open any sound file in Audacity. Make sure that it contains 2 channels
  - Select Tracks -> Resample and select 44100
  - Export -> Export Audio -> Header Raw ; Signed 16 bit PCM
- Convert to c file e.g. with "xxd -i file_example_WAV_1MG.raw file_example_WAV_1MG.c"
  - add the const qualifier to the array definition. E.g const unsigned char file_example_WAV_1MG_raw[] = {

Author
  Phil Schatzmann

Copyright
  Apache License Version 2

## Member Function Documentation

## ◆ doLoop()

bool SoundData::doLoop | ( |  | ) |

Automatic restart playing on end

The documentation for this class was generated from the following files:

- src/SoundData.h
- src/SoundData.cpp