Merge branch 'master' into nvs_parameters

# Conflicts:
#	.cproject
#	Makefile
#	README.md
#	components/cmd_nvs/cmd_nvs.c
#	components/cmd_system/cmd_system.c
#	components/cmd_system/cmd_system.h
#	components/driver_bt/CMakeLists.txt
#	components/wifi-manager/CMakeLists.txt
#	components/wifi-manager/Kconfig.projbuild
#	components/wifi-manager/code.js
#	components/wifi-manager/component.mk
#	components/wifi-manager/dns_server.c
#	components/wifi-manager/dns_server.h
#	components/wifi-manager/http_server.c
#	components/wifi-manager/http_server.h
#	components/wifi-manager/index.html
#	components/wifi-manager/style.css
#	components/wifi-manager/wifi_manager.c
#	components/wifi-manager/wifi_manager.h
#	main/CMakeLists.txt
#	main/console.c
#	main/esp_app_main.c
#	sdkconfig.defaults
This commit is contained in:
Sebastien
2019-10-17 12:45:26 -04:00
parent 9f88945677
commit 6cf04a3a83
10 changed files with 4700 additions and 68 deletions

View File

@@ -88,12 +88,17 @@ void set_volume(unsigned left, unsigned right) {
bool test_open(const char *device, unsigned rates[], bool userdef_rates) {
memset(rates, 0, MAX_SUPPORTED_SAMPLERATES * sizeof(unsigned));
if (!strcmp(device, "BT")) {
rates[0] = 44100;
} else {
unsigned _rates[] = { 192000, 176400, 96000, 88200, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 0 };
if (!strcasecmp(device, "I2S")) {
unsigned _rates[] = { 192000, 176400, 96000, 88200, 48000,
44100, 32000, 24000, 22050, 16000,
12000, 11025, 8000, 0 };
memcpy(rates, _rates, sizeof(_rates));
}
} else if (!strcasecmp(device, "SPDIF")) {
unsigned _rates[] = { 48000, 44100, 0 };
memcpy(rates, _rates, sizeof(_rates));
} else {
rates[0] = 44100;
}
return true;
}