diff --git a/CMakeLists.txt b/CMakeLists.txt index 9864b62..8cf5e7e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,13 +1,13 @@ cmake_minimum_required(VERSION 3.16.0) project(pipedal - VERSION 1.4.79 + VERSION 1.4.82 DESCRIPTION "PiPedal Guitar Effect Pedal For Raspberry Pi" HOMEPAGE_URL "https://rerdavies.github.io/pipedal" ) EXECUTE_PROCESS( COMMAND dpkg --print-architecture COMMAND tr -d '\n' OUTPUT_VARIABLE DEBIAN_ARCHITECTURE ) -set (DISPLAY_VERSION "PiPedal v1.4.79-Beta") +set (DISPLAY_VERSION "PiPedal v1.4.82-Experimental") set (PACKAGE_ARCHITECTURE ${DEBIAN_ARCHITECTURE}) set (CMAKE_INSTALL_PREFIX "/usr/") diff --git a/README.md b/README.md index 4645e27..d7c1c3a 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,11 @@ -Download: v1.4.79 +Download: v1.4.82 Website: [https://rerdavies.github.io/pipedal](https://rerdavies.github.io/pipedal). Documentation: [https://rerdavies.github.io/pipedal/Documentation.html](https://rerdavies.github.io/pipedal/Documentation.html). -#### NEW version 1.4.79 Release. See the [release notes](https://rerdavies.github.io/pipedal/ReleaseNotes) for details. New Phaser and Graphic Equalizer plugins. +#### NEW version 1.4.82 Release. See the [release notes](https://rerdavies.github.io/pipedal/ReleaseNotes) for details. New Phaser and Graphic Equalizer plugins.   diff --git a/docs/Installing.md b/docs/Installing.md index f8935b8..95674ae 100644 --- a/docs/Installing.md +++ b/docs/Installing.md @@ -13,18 +13,18 @@ page_icon: img/Install4.jpg Download the most recent Debian (.deb) package for your platform: -- [Raspberry Pi OS bookworm (aarch64) v1.4.79](https://github.com/rerdavies/pipedal/releases/download/v1.4.79/pipedal_1.4.79_arm64.deb) -- [Ubuntu 24.x (aarch64) v1.4.79](https://github.com/rerdavies/pipedal/releases/download/v1.4.79/pipedal_1.4.79_arm64.deb) -- [Ubuntu 24.x (amd64) v1.4.79](https://github.com/rerdavies/pipedal/releases/download/v1.4.79/pipedal_1.4.79_amd64.deb) +- [Raspberry Pi OS bookworm (aarch64) v1.4.82](https://github.com/rerdavies/pipedal/releases/download/v1.4.82/pipedal_1.4.82_arm64.deb) +- [Ubuntu 24.x (aarch64) v1.4.82](https://github.com/rerdavies/pipedal/releases/download/v1.4.82/pipedal_1.4.82_arm64.deb) +- [Ubuntu 24.x (amd64) v1.4.82](https://github.com/rerdavies/pipedal/releases/download/v1.4.82/pipedal_1.4.82_amd64.deb) -Version 1.4.79 has been tested on Raspberry Pi OS bookworm, Ubuntu 24.04 (amd64), and Ubuntu 24.10 (aarch64). Download the appropriate package for your platform, and install using the following procedure: +Version 1.4.82 has been tested on Raspberry Pi OS bookworm, Ubuntu 24.04 (amd64), and Ubuntu 24.10 (aarch64). Download the appropriate package for your platform, and install using the following procedure: ``` sudo apt update sudo apt upgrade cd ~/Downloads - sudo apt-get install ./pipedal_1.4.79_arm64.deb + sudo apt-get install ./pipedal_1.4.82_arm64.deb ``` You MUST use `apt-get`. `apt` will not install downloaded packages; and `dpkg -i` will not install dependencies. diff --git a/docs/ReleaseNotes.md b/docs/ReleaseNotes.md index 3d45137..791e5b0 100644 --- a/docs/ReleaseNotes.md +++ b/docs/ReleaseNotes.md @@ -1,4 +1,9 @@ # Release Notes +## Pipedal 1.4.79 Experimental +Bug fixes: +- Thread-per-plugin-instance for LV2_WORKER threads (see issue #339) +- Fixes for selection issues when modifying pedalboard structure. + ## Pipedal 1.4.79 Beta The Big Feature: diff --git a/docs/download.md b/docs/download.md index 8e8b412..4167dfc 100644 --- a/docs/download.md +++ b/docs/download.md @@ -4,9 +4,9 @@ Download the most recent Debian (.deb) package for your platform: -- [Raspberry Pi OS bookworm (aarch64) v1.4.79 Beta](https://github.com/rerdavies/pipedal/releases/download/v1.4.79/pipedal_1.4.79_arm64.deb) -- [Ubuntu 24.x (aarch64) v1.4.79 Alpha](https://github.com/rerdavies/pipedal/releases/download/v1.4.79/pipedal_1.4.79_arm64.deb) -- [Ubuntu 24.x (amd64) v1.4.79 Alpha](https://github.com/rerdavies/pipedal/releases/download/v1.4.79/pipedal_1.4.79_amd64.deb) +- [Raspberry Pi OS bookworm (aarch64) v1.4.82 Beta](https://github.com/rerdavies/pipedal/releases/download/v1.4.82/pipedal_1.4.82_arm64.deb) +- [Ubuntu 24.x (aarch64) v1.4.82 Alpha](https://github.com/rerdavies/pipedal/releases/download/v1.4.82/pipedal_1.4.82_arm64.deb) +- [Ubuntu 24.x (amd64) v1.4.82 Alpha](https://github.com/rerdavies/pipedal/releases/download/v1.4.82/pipedal_1.4.82_amd64.deb) Install the package by running @@ -14,7 +14,7 @@ Install the package by running ``` sudo apt update cd ~/Downloads - sudo apt-get install ./pipedal_1.4.79_arm64.deb + sudo apt-get install ./pipedal_1.4.82_arm64.deb ``` You MUST use `apt-get` to install the package. `apt install` will NOT install the package correctly. The message about missing permissions given by `apt-get` is expected, and can be safely ignored. diff --git a/src/Worker.cpp b/src/Worker.cpp index 7fcca63..e102671 100644 --- a/src/Worker.cpp +++ b/src/Worker.cpp @@ -143,6 +143,7 @@ bool Worker::EmitResponses() void Worker::WaitForAllResponses() { + // do what we can to clear the response queue in order to avoid memory/object leaks using Clock = std::chrono::steady_clock; auto startTime = Clock::now(); while (true) @@ -157,11 +158,12 @@ void Worker::WaitForAllResponses() break; } } - std::chrono::seconds waitDuration = std::chrono::duration_cast(Clock::now()-startTime); - if (waitDuration.count() > 5) { - throw std::logic_error("Timed out waiting for a Worker task to complete."); + std::this_thread::sleep_for(std::chrono::milliseconds(20)); + std::chrono::milliseconds waitDuration = std::chrono::duration_cast(Clock::now()-startTime); + if (waitDuration.count() > 250) { + Lv2Log::error("Timed out waiting for a Worker task to complete."); + // better to leak than to terminate the application. } - std::this_thread::sleep_for(std::chrono::milliseconds(15)); } } @@ -260,21 +262,16 @@ bool HostWorkerThread::StartThread() void HostWorkerThread::Close() { - bool sendClose = false; { std::lock_guard lock{submitMutex}; if (pThread) { if (!closed) { closed = true; - sendClose = true; + ScheduleWorkNoLock(nullptr, 0, nullptr); } } } - if (sendClose) - { - ScheduleWork(nullptr, 0, nullptr); - } } HostWorkerThread::~HostWorkerThread() { @@ -302,6 +299,11 @@ LV2_Worker_Status HostWorkerThread::ScheduleWork(Worker *worker, size_t size, co { exiting = true; } + return ScheduleWorkNoLock(worker, size, data); + +} +LV2_Worker_Status HostWorkerThread::ScheduleWorkNoLock(Worker *worker, size_t size, const void *data) +{ if (requestRingBuffer.writeSpace() < sizeof(worker) + sizeof(size) + size) { diff --git a/src/Worker.hpp b/src/Worker.hpp index 9cf38aa..154ec3d 100644 --- a/src/Worker.hpp +++ b/src/Worker.hpp @@ -57,6 +57,7 @@ namespace pipedal { bool Closed() const { return closed || pThread == nullptr; } LV2_Worker_Status ScheduleWork(Worker*worker, size_t size, const void*data); private: + LV2_Worker_Status ScheduleWorkNoLock(Worker*worker, size_t size, const void*data); std::atomic closed = false; std::unique_ptr pThread; void ThreadProc() noexcept;