pipedald uses service.conf instead of a commandline option.

This commit is contained in:
Robin Davies
2024-09-05 13:31:09 -04:00
parent 9534d3dc41
commit 440f85e1d1
8 changed files with 53 additions and 33 deletions
+19
View File
@@ -1,4 +1,23 @@
# Release Notes
## PiPedal 1.2.49 Release
The theme for this release: fixing big, embarassing bugs.
URGENT: PiPedal 1.2.47 fixed a significant and dangerous defect that may cause loss of presets, banks or configuration data if you remove power from your Raspberry Pi within up to five minutes of last saving data instead of performing an orderly shutdown or reboot. Users of PiPedal should upgrade to at least version 1.2.47 immediately, if they have not alread done so.
In addition, a bug in the Auto Update code prevents PiPedal from seeing PiPedal Release or Beta builds if the most recent build is a Development or Experimental build. If you want to stay in sync with Release or Beta update streams, please install this version right away.
Bug fixes:
- Unable to configure Wi-Fi direct connections.
- Update checks do not see Release or Beta updates if there is a later Development build.
- Unable to configure audio buffers properly for devices with minBufferSize=256.
- Ongoing improvements to TooB Neural Amp Modeler.
Known issues:
- TooB Neural Amp Modeler runs 5% slower than Mike Oliphant's Neural Amp Modeler, despite running virtually identical code from Steven Atkins' NeuralAmpModelerCore project. Investigation continues.
## PiPedal 1.2.47 Release
This version fixes a significant and dangerous defect that may cause loss of presets, banks or configuration data if you remove power from your Raspberry Pi within up to five minutes of last saving data instead of performing an orderly shutdown or reboot. Users of PiPedal should upgrade immediately.
+1 -1
View File
@@ -1315,7 +1315,7 @@ namespace pipedal
throw PiPedalStateException(SS("ALSA error:" << snd_strerror(err)));
}
std::jthread *audioThread;
std::jthread *audioThread = nullptr;
bool audioRunning;
bool block = false;
+1 -1
View File
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2022 Robin E. R. Davies
* Copyright (c) 2022 Robin E. R. Davies
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
+1 -1
View File
@@ -951,7 +951,7 @@ void Install(const fs::path &programPrefix, const std::string endpointAddress)
}
s
<< (programPrefix / "sbin" / PIPEDALD_SERVICE).string()
<< " /etc/pipedal/config /etc/pipedal/react -port " << endpointAddress << " -systemd";
<< " /etc/pipedal/config /etc/pipedal/react -systemd";
map["COMMAND"] = s.str();
}
+18 -18
View File
@@ -118,7 +118,7 @@ std::vector<AlsaDeviceInfo> PiPedalAlsaDevices::GetAlsaDevices()
if (err == 0)
{
unsigned int minRate = 0, maxRate = 0;
snd_pcm_uframes_t minBufferSize, maxBufferSize;
snd_pcm_uframes_t minBufferSize = 0, maxBufferSize = 0;
int dir;
err = snd_pcm_hw_params_get_rate_min(params, &minRate, &dir);
if (err == 0)
@@ -143,6 +143,10 @@ std::vector<AlsaDeviceInfo> PiPedalAlsaDevices::GetAlsaDevices()
info.sampleRates_.push_back(rate);
}
}
if (minBufferSize < 16) {
minBufferSize = 16;
}
info.minBufferSize_ = (uint32_t)minBufferSize;
info.maxBufferSize_ = (uint32_t)maxBufferSize;
cacheDevice(info.name_, info);
@@ -169,15 +173,14 @@ std::vector<AlsaDeviceInfo> PiPedalAlsaDevices::GetAlsaDevices()
snd_config_update_free_global();
Lv2Log::debug("GetAlsaDevices --");
for (auto& device: result)
for (auto &device : result)
{
Lv2Log::debug(SS(" " << device.name_ << " " << device.longName_ << " " << device.cardId_));
}
return result;
}
static std::vector<AlsaMidiDeviceInfo> GetAlsaDevices(const char*devname, const char*direction)
static std::vector<AlsaMidiDeviceInfo> GetAlsaDevices(const char *devname, const char *direction)
{
std::vector<AlsaMidiDeviceInfo> result;
{
@@ -206,9 +209,9 @@ static std::vector<AlsaMidiDeviceInfo> GetAlsaDevices(const char*devname, const
if (desc != nullptr) // skip virtual device
{
if (ioid == nullptr || strcmp(ioid,direction) == 0)
if (ioid == nullptr || strcmp(ioid, direction) == 0)
{
result.push_back(AlsaMidiDeviceInfo(name,desc));
result.push_back(AlsaMidiDeviceInfo(name, desc));
}
}
if (name && strcmp("null", name) != 0)
@@ -226,40 +229,37 @@ static std::vector<AlsaMidiDeviceInfo> GetAlsaDevices(const char*devname, const
return result;
}
std::vector<AlsaMidiDeviceInfo> pipedal::GetAlsaMidiInputDevices()
{
return GetAlsaDevices("rawmidi","Input");
return GetAlsaDevices("rawmidi", "Input");
}
std::vector<AlsaMidiDeviceInfo> pipedal::GetAlsaMidiOutputDevices()
{
return GetAlsaDevices("rawmidi","Output");
return GetAlsaDevices("rawmidi", "Output");
}
AlsaMidiDeviceInfo::AlsaMidiDeviceInfo(const char*name, const char*description)
:name_(name)
AlsaMidiDeviceInfo::AlsaMidiDeviceInfo(const char *name, const char *description)
: name_(name)
{
// extract just the display name from description.
// undocumented but e.g.: M2, M2\nM2 Raw Midi
const char *p = description;
const char *pEnd = p;
// undocumented but e.g.: M2, M2\nM2 Raw Midi
while (pEnd != nullptr && *pEnd != 0
&& *pEnd != ','
&& *pEnd != '\n'
)
while (pEnd != nullptr && *pEnd != 0 && *pEnd != ',' && *pEnd != '\n')
{
++pEnd;
}
if (p != pEnd)
{
description_ = std::string(p,pEnd);
} else {
description_ = std::string(p, pEnd);
}
else
{
description = name;
}
}
JSON_MAP_BEGIN(AlsaDeviceInfo)
JSON_MAP_REFERENCE(AlsaDeviceInfo, cardId)
JSON_MAP_REFERENCE(AlsaDeviceInfo, id)
+1 -7
View File
@@ -559,11 +559,6 @@ void UninstallP2p()
}
WifiDirectConfigSettings wifiDirectConfigSettings;
wifiDirectConfigSettings.Load();
wifiDirectConfigSettings.enable_ = false;
SetWifiDirectConfig(wifiDirectConfigSettings);
}
::sync();
}
@@ -655,7 +650,7 @@ static void ConfigDhcpcdForP2p()
}
void pipedal::SetWifiDirectConfig(const WifiDirectConfigSettings &settings)
{
settings.Save();
try
{
char band;
@@ -675,7 +670,6 @@ void pipedal::SetWifiDirectConfig(const WifiDirectConfigSettings &settings)
else
{
InstallP2p(settings);
sysExec(SYSTEMCTL_BIN " restart pipedald");
}
}
catch (const std::exception &e)
+6 -1
View File
@@ -1252,7 +1252,12 @@ namespace pipedal
for (auto it = m_connections.begin(); it != m_connections.end(); ++it)
{
m_endpoint.close(*it, websocketpp::close::status::normal, "");
try {
m_endpoint.close(*it, websocketpp::close::status::normal, "");
} catch (const std::exception&ignored)
{
}
}
}
}
+6 -4
View File
@@ -1,7 +1,9 @@
- feature: redo ./makepackage so that it runs without sudo.
- Bug: text Cursor hovering over the breadcrumb bar in file property dialog.
- Bug: Turning off wifi-direct sould re-enable NetworkManager.
- ToobML save/restore state.
- Back button after reloads on Android.
- pidedal_nm_p2p2 service not started from web ui.
- pipedal_nm_p2pd connection not visible.
- hdcpcd spurious ipv6 error messages.
- also stopping on startup, even with big buffers.
- make app use the same theme settings as the website.