arduino-audio-tools
Loading...
Searching...
No Matches
USBAudioHostStream.h
Go to the documentation of this file.
1#pragma once
2
3// Abstraction which provides the platform specific USB Audio Host class
4// implementation: USBAudioHostStream reads from an attached USB microphone
5// and/or writes to an attached USB speaker with the same API as the
6// USBAudioStream device.
7//
8// - Adafruit TinyUSB (USE_TINYUSB / USE_TINYUSB_HOST: RP2040/RP2350, SAMD,
9// nRF52, CH32 with a native host port, Pico-PIO-USB or MAX3421E):
10// USBAudioHostTinyUSB, or USBAudioHostTinyUSBFreeRTOS with USE_FREERTOS
11// - ESP32-S2/S3/P4: USBAudioHostESP32 using the ESP-IDF usb_host library.
12// Define USE_TINYUSB before including this file to use the Adafruit
13// TinyUSB host stack instead.
14// - STM32: USBAudioHostTinyUSB (Adafruit TinyUSB with host support)
15#include "AudioToolsConfig.h"
16
17#if defined(USE_TINYUSB) || defined(USE_TINYUSB_HOST) || \
18 (defined(ARDUINO_ARCH_STM32) && !defined(ESP32))
19# include "USBAudioHostTinyUSB.h"
20# if defined(USE_FREERTOS)
23 namespace audio_tools { using USBAudioHostStream = USBAudioHostTinyUSBFreeRTOS; }
24# else
25 namespace audio_tools { using USBAudioHostStream = USBAudioHostTinyUSB; }
26# endif
27#elif defined(ESP32)
29# include "USBAudioHostESP32.h"
31#elif defined(ARDUINO_ARCH_RENESAS)
32# error "USB Audio Host is not supported on Renesas: the core provides no USB host stack"
33#elif defined(IS_ZEPHYR)
34# error "USB Audio Host is not supported on Zephyr"
35#else
36# error "USB Audio Host is not supported on this platform"
37#endif
USB Audio host for ESP32-S2/S3/P4 using the ESP-IDF usb_host library: reads audio from an attached US...
Definition USBAudioHostESP32.h:42
Generic Implementation of sound input and output for desktop environments using portaudio.
Definition LMSEchoCancellationStream.h:6
USBAudioHostESP32 USBAudioHostStream
Definition USBAudioHostStream.h:30