arduino-audio-driver
Loading...
Searching...
No Matches
ConfigAudioDriver.h
Go to the documentation of this file.
1#pragma once
2
3// Default volume at startup
4#ifndef DRIVER_DEFAULT_VOLUME
5# define DRIVER_DEFAULT_VOLUME 70
6#endif
7
8// AudioBoard getVolume() can report the volume reported by the driver or the volume that was last
9// set. When using the driver volume, there might be small rounding errors compared to
10// the last defined value.
11#ifndef DRIVER_REPORT_DRIVER_VOLUME
12# define DRIVER_REPORT_DRIVER_VOLUME false
13#endif
14
15
16// To increase the max volume e.g. for ai_thinker (ES8388) 2957 or A202 -> set
17// to 0, 1 or 2. 0: AUX volume is LINE level; 1: you can control the AUX volume with
18// setVolume()
19#ifndef AI_THINKER_ES8388_VOLUME_HACK
20# define AI_THINKER_ES8388_VOLUME_HACK 1
21#endif
22
23// Define the default gain for the microphone amp (see values from
24// es_mic_gain_t) Alternativly you can call es8388_set_mic_gain(es_mic_gain_t
25// gain) if you prefer to use value from an comprehensive enum
26#ifndef ES8388_DEFAULT_INPUT_GAIN
27# define ES8388_DEFAULT_INPUT_GAIN 25
28#endif
29
30// For AI Thinker Audiokit we mute the power amplifier if the line is defined;
31// set to -1 to deactivate this functionality
32#ifndef ES8388_PA_LINE
33# define ES8388_PA_LINE 1
34#endif
35
36// If set to true, call Wire.close() on end: this might cause that the
37// functionality can not be restarted
38#ifndef FORCE_WIRE_CLOSE
39# define FORCE_WIRE_CLOSE false
40#endif
41
43#ifndef AUDIO_DRIVER_LOGGIN_ACTVIE
44# define AUDIO_DRIVER_LOGGIN_ACTVIE true
45#endif
46
48#ifndef AUDIO_DRIVER_LOG_LEVEL
49# define AUDIO_DRIVER_LOG_LEVEL 2
50#endif
51
53#if !defined(AUDIO_DRIVER_LOGGING_IDF) && defined(ESP32_CMAKE)
54# define AUDIO_DRIVER_LOGGING_IDF
55#endif
56
58#if AUDIO_DRIVER_FORCE_IDF
59# define AUDIO_DRIVER_FORCE_IDF false
60#endif
61
63#ifndef AUDIO_DRIVER_USE_NEW_API
64# define AUDIO_DRIVER_USE_NEW_API
65#endif