mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-01-27 12:50:49 +03:00
NVS Refactor ** Factory+Squeezelite FLASH required for this branch!
This is a major refactoring of the nvs parameters storage. To support this, a new partition was added. To start using this branch, one must flash all binaries and possibly re-configure the system.
This commit is contained in:
@@ -269,29 +269,27 @@ void raop_sink_cmd_handler(raop_event_t event, void *param)
|
||||
* We provide the generic codec register option
|
||||
*/
|
||||
void register_external(void) {
|
||||
#ifdef CONFIG_BT_SINK
|
||||
if (!strcasestr(output.device, "BT ")) {
|
||||
bt_sink_init(bt_sink_cmd_handler, sink_data_handler);
|
||||
LOG_INFO("Initializing BT sink");
|
||||
if (!strcasestr(output.device, "BT ") ) {
|
||||
if(enable_bt_sink){
|
||||
bt_sink_init(bt_sink_cmd_handler, sink_data_handler);
|
||||
LOG_INFO("Initializing BT sink");
|
||||
}
|
||||
} else {
|
||||
LOG_WARN("Cannot be a BT sink and source");
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_AIRPLAY_SINK
|
||||
raop_sink_init(raop_sink_cmd_handler, raop_sink_data_handler);
|
||||
LOG_INFO("Initializing AirPlay sink");
|
||||
#endif
|
||||
if(enable_airplay){
|
||||
raop_sink_init(raop_sink_cmd_handler, raop_sink_data_handler);
|
||||
LOG_INFO("Initializing AirPlay sink");
|
||||
}
|
||||
}
|
||||
|
||||
void deregister_external(void) {
|
||||
#ifdef CONFIG_BT_SINK
|
||||
if (!strcasestr(output.device, "BT ")) {
|
||||
if (!strcasestr(output.device, "BT ") && enable_bt_sink) {
|
||||
bt_sink_deinit();
|
||||
LOG_INFO("Stopping BT sink");
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_AIRPLAY_SINK
|
||||
raop_sink_deinit();
|
||||
LOG_INFO("Stopping AirPlay sink");
|
||||
#endif
|
||||
if(enable_airplay){
|
||||
raop_sink_deinit();
|
||||
LOG_INFO("Stopping AirPlay sink");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user