opening slow audio devices on boot

This commit is contained in:
Robin Davies
2024-08-11 16:17:29 -04:00
parent f82408607e
commit fcc5e813a4
8 changed files with 27 additions and 18 deletions
+2 -2
View File
@@ -1,10 +1,10 @@
cmake_minimum_required(VERSION 3.16.0) cmake_minimum_required(VERSION 3.16.0)
project(pipedal project(pipedal
VERSION 1.2.34 VERSION 1.2.35
DESCRIPTION "PiPedal Guitar Effect Pedal For Raspberry Pi" DESCRIPTION "PiPedal Guitar Effect Pedal For Raspberry Pi"
HOMEPAGE_URL "https://rerdavies.github.io/pipedal" HOMEPAGE_URL "https://rerdavies.github.io/pipedal"
) )
set (DISPLAY_VERSION "v1.2.34beta2") set (DISPLAY_VERSION "v1.2.35beta2")
set (CMAKE_INSTALL_PREFIX "/usr/") set (CMAKE_INSTALL_PREFIX "/usr/")
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
"socket_server_port": 8080, "socket_server_port": 80,
"socket_server_address": "*", "socket_server_address": "*",
"debug": true, "debug": true,
"max_upload_size": 1048576, "max_upload_size": 1048576,
+1 -1
View File
@@ -353,7 +353,7 @@ const PluginOutputControl =
<div style={{width: 4, height: (this.DB_VU_HEIGHT-yellowLevel),position: "absolute", marginTop: yellowLevel, background: "#0A0"}} /> <div style={{width: 4, height: (this.DB_VU_HEIGHT-yellowLevel),position: "absolute", marginTop: yellowLevel, background: "#0A0"}} />
<div ref={this.dbVuRef} style={{ width: 4,position: "absolute", marginTop: 0,height: this.VU_HEIGHT, background: "#000" }} /> <div ref={this.dbVuRef} style={{ width: 4,position: "absolute", marginTop: 0,height: this.VU_HEIGHT, background: "#000" }} />
<div ref={this.dbVuTelltaleRef} style={{ width: 4,position: "absolute", marginTop: 0,height: 3, background: "#C00" }} /> <div ref={this.dbVuTelltaleRef} style={{ width: 4,position: "absolute", marginTop: 100,height: 3, background: "#C00" }} />
</div> </div>
</div> </div>
+1 -1
View File
@@ -1961,7 +1961,7 @@ namespace pipedal
for (int retry = 0; retry < 15; ++retry) for (int retry = 0; retry < 15; ++retry)
{ {
err = snd_pcm_open(&playbackHandle, alsaDeviceName.c_str(), SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK); err = snd_pcm_open(&playbackHandle, alsaDeviceName.c_str(), SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
if (err == -EBUSY) if (err < 0) // field report of a device that is present, but won't immediately open.
{ {
sleep(1); sleep(1);
continue; continue;
+10 -7
View File
@@ -603,12 +603,19 @@ void SetVarPermissions(
using namespace std::filesystem; using namespace std::filesystem;
try { try {
if (fs::exists(path)) { if (fs::exists(path)) {
chown(path.c_str(),uid,gid);
if (fs::is_directory(path)) { if (fs::is_directory(path)) {
fs::permissions(path, directoryPermissions, fs::perm_options::replace); fs::permissions(path, directoryPermissions, fs::perm_options::replace);
for (const auto& entry : fs::recursive_directory_iterator(path)) { for (const auto& entry : fs::recursive_directory_iterator(path)) {
cout << " " << entry.path() << endl;
if (chown(entry.path().c_str(),uid,gid) != 0)
{
std::cout << "Error: failed to set ownership of file " << entry.path() << std::endl;
}
try { try {
if (fs::is_directory(entry)) if (fs::is_directory(entry.path()))
{ {
fs::permissions(entry.path(), directoryPermissions, fs::perm_options::replace); fs::permissions(entry.path(), directoryPermissions, fs::perm_options::replace);
} else { } else {
@@ -618,15 +625,11 @@ void SetVarPermissions(
{ {
std::cout << "Error: failed to set permissions on file " << entry.path() << std::endl; std::cout << "Error: failed to set permissions on file " << entry.path() << std::endl;
} }
if (chown(path.c_str(),uid,gid) != 0)
{
std::cout << "Error: failed to set ownership of file " << entry.path() << std::endl;
}
} }
} else { } else {
fs::permissions(path,filePermissions, fs::perm_options::replace); fs::permissions(path,filePermissions, fs::perm_options::replace);
chown(path.c_str(),uid,gid);
} }
} else { } else {
std::cout << "Error: Path does not exist: " << path << std::endl; std::cout << "Error: Path does not exist: " << path << std::endl;
+1 -1
View File
@@ -34,7 +34,7 @@ namespace pipedal
std::string alsaDevice_; std::string alsaDevice_;
uint64_t sampleRate_ = 0; uint64_t sampleRate_ = 0;
uint32_t bufferSize_ = 64; uint32_t bufferSize_ = 64;
uint32_t numberOfBuffers_ = 2; uint32_t numberOfBuffers_ = 3;
public: public:
JackServerSettings(); JackServerSettings();
+7 -1
View File
@@ -701,7 +701,10 @@ int main(int argc, char *argv[])
// wait up to 15 seconds for the midi device to come online. // wait up to 15 seconds for the midi device to come online.
auto devices = model.GetAlsaDevices(); auto devices = model.GetAlsaDevices();
bool found = false; bool found = false;
if (!HasAlsaDevice(devices, serverSettings.GetAlsaInputDevice())) if (HasAlsaDevice(devices, serverSettings.GetAlsaInputDevice()))
{
Lv2Log::info(SS("Found ALSA device " << serverSettings.GetAlsaInputDevice() << "."));
} else
{ {
for (int i = 0; i < 5; ++i) for (int i = 0; i < 5; ++i)
{ {
@@ -727,6 +730,9 @@ int main(int argc, char *argv[])
Lv2Log::info(SS("ALSA device " << serverSettings.GetAlsaInputDevice() << " not found.")); Lv2Log::info(SS("ALSA device " << serverSettings.GetAlsaInputDevice() << " not found."));
} }
} }
} else {
Lv2Log::info("No ALSA device selected.");
} }
// pre-cache device info before we let audio services run. // pre-cache device info before we let audio services run.
+4 -4
View File
@@ -1,8 +1,8 @@
x group EQ congrols on Toob Preamp. - chmod not working
- x TooB NAM: dbVu telltale is zero0.
- x TooB NAM: bass [] mid trebble.
-x Bug with FLAC libs in debian package. -x Bug with FLAC libs in debian package.
-x check default presets. - X check FLAC decode.
-x check Toob power stage is installed.
X check FLAC decode.
- make app use the same theme settings as the website. - make app use the same theme settings as the website.
- BUG: gcs when we have an animated output control - BUG: gcs when we have an animated output control
- Shutdown/reboot midi bindings - Shutdown/reboot midi bindings