arduino-audio-tools
Classes | Namespaces | Enumerations | Functions | Variables
A2DPStream.h File Reference

A2DP Support via Arduino Streams. More...

#include "AudioConfig.h"
#include "AudioTools.h"
#include "BluetoothA2DPSink.h"
#include "BluetoothA2DPSource.h"
#include "AudioTools/CoreAudio/AudioStreams.h"
#include "AudioTools/Concurrency/BufferRTOS.h"
#include "AudioTools/CoreAudio/AudioBasic/StrView.h"

Go to the source code of this file.

Classes

class  A2DPConfig
 Configuration for A2DPStream. More...
 
class  A2DPStream
 Stream support for A2DP using https://github.com/pschatzmann/ESP32-A2DP: begin(TX_MODE) opens a a2dp_source and begin(RX_MODE) a a2dp_sink. The data is in int16_t with 2 channels at 44100 hertz. We support only one instance of the class! Please note that this is a conveniance class that supports the stream api, however this is rather inefficient, beause quite a big buffer needs to be allocated. It is recommended to use the API with the callbacks. Examples can be found in the a2dp examples directory starting with basic. More...
 

Namespaces

 audio_tools
 Generic Implementation of sound input and output for desktop environments using portaudio.
 

Enumerations

enum  A2DPNoData { A2DPSilence , A2DPWhoosh }
 A2DP Action when there is no data.
 
enum  A2DPStartLogic { StartWhenBufferFull , StartOnConnect }
 A2DP Startup Logic.
 

Functions

void a2dp_stream_sink_sound_data (const uint8_t *data, uint32_t len)
 
int32_t a2dp_stream_source_sound_data (Frame *data, int32_t len)
 

Variables

static BufferRTOS< uint8_t > a2dp_buffer {0, A2DP_BUFFER_SIZE, portMAX_DELAY, portMAX_DELAY}
 
static A2DPStream * A2DPStream_self =nullptr
 
static bool is_a2dp_active = false
 

Detailed Description

A2DP Support via Arduino Streams.

Author
Phil Schatzmann