Experimental commit for issue #337; valgrind fixes.

This commit is contained in:
Robin E. R. Davies
2025-07-19 21:37:46 -04:00
parent 5e9e8c78e6
commit b261f98167
43 changed files with 277 additions and 88 deletions
View File
+2 -2
View File
@@ -1,13 +1,13 @@
cmake_minimum_required(VERSION 3.16.0) cmake_minimum_required(VERSION 3.16.0)
project(pipedal project(pipedal
VERSION 1.4.77 VERSION 1.4.78
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"
) )
EXECUTE_PROCESS( COMMAND dpkg --print-architecture COMMAND tr -d '\n' OUTPUT_VARIABLE DEBIAN_ARCHITECTURE ) EXECUTE_PROCESS( COMMAND dpkg --print-architecture COMMAND tr -d '\n' OUTPUT_VARIABLE DEBIAN_ARCHITECTURE )
set (DISPLAY_VERSION "PiPedal v1.4.77-Beta") set (DISPLAY_VERSION "PiPedal v1.4.78-Experimental")
set (PACKAGE_ARCHITECTURE ${DEBIAN_ARCHITECTURE}) set (PACKAGE_ARCHITECTURE ${DEBIAN_ARCHITECTURE})
set (CMAKE_INSTALL_PREFIX "/usr/") set (CMAKE_INSTALL_PREFIX "/usr/")
+2 -1
View File
@@ -319,6 +319,7 @@ namespace pipedal
} }
if (seqHandle) if (seqHandle)
{ {
Lv2Log::debug("Closing ALSA Sequencer");
snd_seq_close(seqHandle); snd_seq_close(seqHandle);
seqHandle = nullptr; seqHandle = nullptr;
} }
@@ -608,7 +609,7 @@ namespace pipedal
#ifndef NDEBUG #ifndef NDEBUG
#define MSG_DEBUG_LOG(x) \ #define MSG_DEBUG_LOG(x) \
case x: \ case x: \
Lv2Log::debug("ALSA Sequencer Message" #x); \ Lv2Log::debug("ALSA Sequencer Message " #x); \
break; break;
#else #else
#define MSG_DEBUG_LOG(x) #define MSG_DEBUG_LOG(x)
+2 -2
View File
@@ -9,11 +9,11 @@
<img src="https://img.shields.io/github/downloads/rerdavies/pipedal/total?color=%23808080&link=https%3A%2F%2Frerdavies.github.io%2Fpipedal%2Fdownload.html"/> <img src="https://img.shields.io/github/downloads/rerdavies/pipedal/total?color=%23808080&link=https%3A%2F%2Frerdavies.github.io%2Fpipedal%2Fdownload.html"/>
Download:&nbsp;<a href='https://rerdavies.github.io/pipedal/download.html'>v1.4.77</a> Download:&nbsp;<a href='https://rerdavies.github.io/pipedal/download.html'>v1.4.78</a>
Website:&nbsp;[https://rerdavies.github.io/pipedal](https://rerdavies.github.io/pipedal). Website:&nbsp;[https://rerdavies.github.io/pipedal](https://rerdavies.github.io/pipedal).
Documentation:&nbsp;[https://rerdavies.github.io/pipedal/Documentation.html](https://rerdavies.github.io/pipedal/Documentation.html). Documentation:&nbsp;[https://rerdavies.github.io/pipedal/Documentation.html](https://rerdavies.github.io/pipedal/Documentation.html).
#### NEW version 1.4.77 Release. See the [release notes](https://rerdavies.github.io/pipedal/ReleaseNotes) for details. New Phaser and Graphic Equalizer plugins. #### NEW version 1.4.78 Release. See the [release notes](https://rerdavies.github.io/pipedal/ReleaseNotes) for details. New Phaser and Graphic Equalizer plugins.
&nbsp; &nbsp;
+5 -5
View File
@@ -13,18 +13,18 @@ page_icon: img/Install4.jpg
Download the most recent Debian (.deb) package for your platform: Download the most recent Debian (.deb) package for your platform:
- [Raspberry Pi OS bookworm (aarch64) v1.4.77](https://github.com/rerdavies/pipedal/releases/download/v1.4.77/pipedal_1.4.77_arm64.deb) - [Raspberry Pi OS bookworm (aarch64) v1.4.78](https://github.com/rerdavies/pipedal/releases/download/v1.4.78/pipedal_1.4.78_arm64.deb)
- [Ubuntu 24.x (aarch64) v1.4.77](https://github.com/rerdavies/pipedal/releases/download/v1.4.77/pipedal_1.4.77_arm64.deb) - [Ubuntu 24.x (aarch64) v1.4.78](https://github.com/rerdavies/pipedal/releases/download/v1.4.78/pipedal_1.4.78_arm64.deb)
- [Ubuntu 24.x (amd64) v1.4.77](https://github.com/rerdavies/pipedal/releases/download/v1.4.77/pipedal_1.4.77_amd64.deb) - [Ubuntu 24.x (amd64) v1.4.78](https://github.com/rerdavies/pipedal/releases/download/v1.4.78/pipedal_1.4.78_amd64.deb)
Version 1.4.77 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.78 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 update
sudo apt upgrade sudo apt upgrade
cd ~/Downloads cd ~/Downloads
sudo apt-get install ./pipedal_1.4.77_arm64.deb sudo apt-get install ./pipedal_1.4.78_arm64.deb
``` ```
You MUST use `apt-get`. `apt` will not install downloaded packages; and `dpkg -i` will not install dependencies. You MUST use `apt-get`. `apt` will not install downloaded packages; and `dpkg -i` will not install dependencies.
+4 -4
View File
@@ -4,9 +4,9 @@
Download the most recent Debian (.deb) package for your platform: Download the most recent Debian (.deb) package for your platform:
- [Raspberry Pi OS bookworm (aarch64) v1.4.77 Beta](https://github.com/rerdavies/pipedal/releases/download/v1.4.77/pipedal_1.4.77_arm64.deb) - [Raspberry Pi OS bookworm (aarch64) v1.4.78 Beta](https://github.com/rerdavies/pipedal/releases/download/v1.4.78/pipedal_1.4.78_arm64.deb)
- [Ubuntu 24.x (aarch64) v1.4.77 Alpha](https://github.com/rerdavies/pipedal/releases/download/v1.4.77/pipedal_1.4.77_arm64.deb) - [Ubuntu 24.x (aarch64) v1.4.78 Alpha](https://github.com/rerdavies/pipedal/releases/download/v1.4.78/pipedal_1.4.78_arm64.deb)
- [Ubuntu 24.x (amd64) v1.4.77 Alpha](https://github.com/rerdavies/pipedal/releases/download/v1.4.77/pipedal_1.4.77_amd64.deb) - [Ubuntu 24.x (amd64) v1.4.78 Alpha](https://github.com/rerdavies/pipedal/releases/download/v1.4.78/pipedal_1.4.78_amd64.deb)
Install the package by running Install the package by running
@@ -14,7 +14,7 @@ Install the package by running
``` ```
sudo apt update sudo apt update
cd ~/Downloads cd ~/Downloads
sudo apt-get install ./pipedal_1.4.77_arm64.deb sudo apt-get install ./pipedal_1.4.78_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 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. expected, and can be safely ignored.
+1 -1
View File
@@ -93,7 +93,7 @@ cabir:impulseFile3
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ; doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ; lv2:minorVersion 0 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
rdfs:comment """ rdfs:comment """
TooB Cab IR is a convolution-based guitar cabinet impulse response simulator. TooB Cab IR is a convolution-based guitar cabinet impulse response simulator.
+1 -1
View File
@@ -50,7 +50,7 @@ toob:frequencyResponseVector
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ; doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ; lv2:minorVersion 0 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
mod:brand "TooB"; mod:brand "TooB";
mod:label "TooB CabSim"; mod:label "TooB CabSim";
@@ -53,7 +53,7 @@ toobimpulse:impulseFile
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ; doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ; lv2:minorVersion 0 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
rdfs:comment """ rdfs:comment """
Convolution reverb is a notoriously compute-intensive effect. If you are having performance issues, use the Max T control to constrain the length of the impulse file to Convolution reverb is a notoriously compute-intensive effect. If you are having performance issues, use the Max T control to constrain the length of the impulse file to
@@ -51,7 +51,7 @@ toobimpulse:impulseFile
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ; doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ; lv2:minorVersion 0 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
rdfs:comment """ rdfs:comment """
+1 -1
View File
@@ -66,7 +66,7 @@ inputStage:filterGroup
doap:license <https://two-play.com/TooB/licenses/isc> ; doap:license <https://two-play.com/TooB/licenses/isc> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ; lv2:minorVersion 0 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
mod:brand "TooB"; mod:brand "TooB";
mod:label "TooB Input"; mod:label "TooB Input";
+1 -1
View File
@@ -68,7 +68,7 @@ pstage:stage3
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ; doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ; lv2:minorVersion 0 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
mod:brand "TooB"; mod:brand "TooB";
mod:label "Power Stage"; mod:label "Power Stage";
+1 -1
View File
@@ -57,7 +57,7 @@
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ; doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ; lv2:minorVersion 0 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
rdfs:comment "TooB spectrum analyzer" ; rdfs:comment "TooB spectrum analyzer" ;
mod:brand "TooB"; mod:brand "TooB";
+1 -1
View File
@@ -57,7 +57,7 @@ tonestack:eqGroup
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ; doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ; lv2:minorVersion 0 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
uiext:ui <http://two-play.com/plugins/toob-tone-stack-ui>; uiext:ui <http://two-play.com/plugins/toob-tone-stack-ui>;
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -40,7 +40,7 @@
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ; doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ; lv2:minorVersion 0 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
rdfs:comment """ rdfs:comment """
Emulation of a Boss CE-2 Chorus. Emulation of a Boss CE-2 Chorus.
+1 -1
View File
@@ -41,7 +41,7 @@
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ; doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ; lv2:minorVersion 0 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
rdfs:comment """ rdfs:comment """
A straightforward no-frills digital delay. A straightforward no-frills digital delay.
+1 -1
View File
@@ -41,7 +41,7 @@
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ; doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ; lv2:minorVersion 0 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
rdfs:comment """ rdfs:comment """
Emulation of a Boss BF-2 Flanger, based on circuit analysis and simulation of the original. Emulation of a Boss BF-2 Flanger, based on circuit analysis and simulation of the original.
@@ -41,7 +41,7 @@
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ; doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ; lv2:minorVersion 0 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
rdfs:comment """ rdfs:comment """
Digital emulation of a Boss BF-2 Flanger. Digital emulation of a Boss BF-2 Flanger.
+1 -1
View File
@@ -41,7 +41,7 @@
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ; doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ; lv2:minorVersion 0 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
rdfs:comment """ rdfs:comment """
Toob Freeverb is an Lv2 implementation of the famous Freeverb reverb effect. FreeVerb delivers a well-balanced reverb with very little tonal coloration. Toob Freeverb is an Lv2 implementation of the famous Freeverb reverb effect. FreeVerb delivers a well-balanced reverb with very little tonal coloration.
+1 -1
View File
@@ -41,7 +41,7 @@
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ; doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ; lv2:minorVersion 0 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
rdfs:comment """ rdfs:comment """
A 7 octave graphic equalizer, with frequencies chosen to be useful for EQ-ing guitar signals. A 7 octave graphic equalizer, with frequencies chosen to be useful for EQ-ing guitar signals.
""" ; """ ;
+1 -1
View File
@@ -92,7 +92,7 @@ myprefix:output_group
doap:license <https://opensource.org/license/mit/> ; doap:license <https://opensource.org/license/mit/> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 1 ; lv2:minorVersion 1 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
ui:ui <http://two-play.com/plugins/toob-looper-four-ui>; ui:ui <http://two-play.com/plugins/toob-looper-four-ui>;
+1 -1
View File
@@ -78,7 +78,7 @@ myprefix:output_group
doap:license <https://opensource.org/license/mit/> ; doap:license <https://opensource.org/license/mit/> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 1 ; lv2:minorVersion 1 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
ui:ui <http://two-play.com/plugins/toob-looper-one-ui>; ui:ui <http://two-play.com/plugins/toob-looper-one-ui>;
+1 -1
View File
@@ -67,7 +67,7 @@ toobml:sagGroup
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ; doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ; lv2:minorVersion 0 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
rdfs:comment """ rdfs:comment """
The TooB ML Amplifier plugin provides emulation of a variety of amplifiers and overdrive pedals that are implemented The TooB ML Amplifier plugin provides emulation of a variety of amplifiers and overdrive pedals that are implemented
using neural-network-based machine learning models of real amplifiers. using neural-network-based machine learning models of real amplifiers.
+1 -1
View File
@@ -40,7 +40,7 @@
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ; doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ; lv2:minorVersion 0 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
rdfs:comment """ rdfs:comment """
Remix a stereo input signal. Remix a stereo input signal.
@@ -61,7 +61,7 @@ toobNam:eqGroup
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ; doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ; lv2:minorVersion 0 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
rdfs:comment """ rdfs:comment """
A port of Steven Atkinson's Neural Amp Modeler to LV2. A port of Steven Atkinson's Neural Amp Modeler to LV2.
+1 -1
View File
@@ -54,7 +54,7 @@ noisegate:envelope_group
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ; doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ; lv2:minorVersion 0 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
rdfs:comment """ rdfs:comment """
A noise gate is an audio processing tool that controls the volume of an audio signal A noise gate is an audio processing tool that controls the volume of an audio signal
by allowing it to pass through only when it exceeds a set threshold. by allowing it to pass through only when it exceeds a set threshold.
+1 -1
View File
@@ -40,7 +40,7 @@
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ; doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ; lv2:minorVersion 0 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
rdfs:comment """ rdfs:comment """
A loose emulation of an MXR® Phase 90 Phaser. A loose emulation of an MXR® Phase 90 Phaser.
+1 -1
View File
@@ -60,7 +60,7 @@ toobPlayer:seek
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ; doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ; lv2:minorVersion 0 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
rdfs:comment """ rdfs:comment """
Play audio files. Audio files can optionally be loooped by pressing the "Set loop" button. Play audio files. Audio files can optionally be loooped by pressing the "Set loop" button.
+1 -1
View File
@@ -51,7 +51,7 @@ recordPrefix:audioFile
doap:license <https://opensource.org/license/mit/> ; doap:license <https://opensource.org/license/mit/> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 1 ; lv2:minorVersion 1 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
ui:ui <http://two-play.com/plugins/toob-record-mono-ui>; ui:ui <http://two-play.com/plugins/toob-record-mono-ui>;
+1 -1
View File
@@ -88,7 +88,7 @@ myprefix:loop3_group
doap:license <https://opensource.org/license/mit/> ; doap:license <https://opensource.org/license/mit/> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 1 ; lv2:minorVersion 1 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
ui:ui <http://two-play.com/plugins/toob-record-stereo-ui>; ui:ui <http://two-play.com/plugins/toob-record-stereo-ui>;
+1 -1
View File
@@ -40,7 +40,7 @@
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ; doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ; lv2:minorVersion 0 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
rdfs:comment """ rdfs:comment """
TooB Tuner is a chromatic guitar tuner. TooB Tuner is a chromatic guitar tuner.
""" ; """ ;
+1 -1
View File
@@ -39,7 +39,7 @@
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ; doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
doap:maintainer <http://two-play.com/rerdavies#me> ; doap:maintainer <http://two-play.com/rerdavies#me> ;
lv2:minorVersion 0 ; lv2:minorVersion 0 ;
lv2:microVersion 63 ; lv2:microVersion 64 ;
rdfs:comment """ rdfs:comment """
Volume control. Volume control.
+67 -40
View File
@@ -1484,7 +1484,7 @@ namespace pipedal
#endif #endif
} }
std::jthread *audioThread = nullptr; std::unique_ptr<std::jthread> audioThread;
bool audioRunning; bool audioRunning;
bool block = false; bool block = false;
@@ -1518,32 +1518,36 @@ namespace pipedal
} while (frames > 0); } while (frames > 0);
return framesRead; return framesRead;
} }
protected: protected:
void ReadMidiData(uint32_t audioFrame) void ReadMidiData(uint32_t audioFrame)
{ {
AlsaMidiMessage message; AlsaMidiMessage message;
midiEventCount = 0; midiEventCount = 0;
while(alsaSequencer->ReadMessage(message,0)) while (alsaSequencer->ReadMessage(message, 0))
{ {
size_t messageSize = message.size; size_t messageSize = message.size;
if (messageSize == 0) if (messageSize == 0)
{ {
continue; continue;
} }
if (midiEventMemoryIndex + messageSize >= this->midiEventMemory.size()) { if (midiEventMemoryIndex + messageSize >= this->midiEventMemory.size())
{
continue; continue;
} }
if (midiEventCount >= this->midiEvents.size()) { if (midiEventCount >= this->midiEvents.size())
midiEvents.resize(midiEventCount*2); {
midiEvents.resize(midiEventCount * 2);
} }
// for now, prevent META event messages from propagating. // for now, prevent META event messages from propagating.
if (message.data[0] == 0xFF && message.size > 1) { if (message.data[0] == 0xFF && message.size > 1)
{
continue; continue;
} }
MidiEvent *pEvent = midiEvents.data() + midiEventCount++; MidiEvent *pEvent = midiEvents.data() + midiEventCount++;
pEvent->time = audioFrame; pEvent->time = audioFrame;
pEvent->size = messageSize; pEvent->size = messageSize;
pEvent->buffer = midiEventMemory.data() + midiEventMemoryIndex; pEvent->buffer = midiEventMemory.data() + midiEventMemoryIndex;
memcpy( memcpy(
@@ -1551,11 +1555,10 @@ namespace pipedal
message.data, message.data,
message.size); message.size);
midiEventMemoryIndex += messageSize; midiEventMemoryIndex += messageSize;
} }
} }
private:
private:
long WriteBuffer(snd_pcm_t *handle, uint8_t *buf, size_t frames) long WriteBuffer(snd_pcm_t *handle, uint8_t *buf, size_t frames)
{ {
long framesRead; long framesRead;
@@ -1759,7 +1762,7 @@ namespace pipedal
} }
} }
audioThread = new std::jthread([this]() audioThread = std::make_unique<std::jthread>([this]()
{ AudioThread(); }); { AudioThread(); });
} }
@@ -1773,8 +1776,7 @@ namespace pipedal
terminateAudio(true); terminateAudio(true);
if (audioThread) if (audioThread)
{ {
this->audioThread->join(); this->audioThread = 0; // jthread joins.
this->audioThread = 0;
} }
Lv2Log::debug("Audio thread joined."); Lv2Log::debug("Audio thread joined.");
} }
@@ -1789,9 +1791,6 @@ namespace pipedal
AlsaSequencer::ptr alsaSequencer; AlsaSequencer::ptr alsaSequencer;
public: public:
virtual void SetAlsaSequencer(AlsaSequencer::ptr alsaSequencer) override virtual void SetAlsaSequencer(AlsaSequencer::ptr alsaSequencer) override
{ {
this->alsaSequencer = alsaSequencer; this->alsaSequencer = alsaSequencer;
@@ -1822,7 +1821,7 @@ namespace pipedal
{ {
for (size_t i = 0; i < buffer.size(); ++i) for (size_t i = 0; i < buffer.size(); ++i)
{ {
// delete[] buffer[i]; delete[] buffer[i];
buffer[i] = 0; buffer[i] = 0;
} }
buffer.clear(); buffer.clear();
@@ -1887,6 +1886,51 @@ namespace pipedal
snd_pcm_t *captureHandle = nullptr; snd_pcm_t *captureHandle = nullptr;
snd_pcm_hw_params_t *playbackHwParams = nullptr; snd_pcm_hw_params_t *playbackHwParams = nullptr;
snd_pcm_hw_params_t *captureHwParams = nullptr; snd_pcm_hw_params_t *captureHwParams = nullptr;
Finally ff_playbackHandle{
[&playbackHandle]()
{
if (playbackHandle)
{
int rc = snd_pcm_close(playbackHandle);
if (rc < 0)
{
throw std::runtime_error("snd_pcm_close failed.");
}
playbackHandle = nullptr;
}
}};
Finally ff_captureHandle{
[&captureHandle]()
{
if (captureHandle)
{
int rc = snd_pcm_close(captureHandle);
if (rc < 0)
{
throw std::runtime_error("snd_pcm_close failed.");
}
captureHandle = nullptr;
}
}};
Finally ff_playbackHwParams{
[&playbackHwParams]()
{
if (playbackHwParams)
{
snd_pcm_hw_params_free(playbackHwParams);
}
}};
Finally ff_captureHwParams{
[&captureHwParams]()
{
if (captureHwParams)
{
snd_pcm_hw_params_free(captureHwParams);
}
}};
std::string alsaDeviceName = jackServerSettings.GetAlsaInputDevice(); std::string alsaDeviceName = jackServerSettings.GetAlsaInputDevice();
bool result = false; bool result = false;
@@ -2001,28 +2045,6 @@ namespace pipedal
result = false; result = false;
throw; throw;
} }
if (playbackHwParams)
{
snd_pcm_hw_params_free(playbackHwParams);
playbackHwParams = nullptr;
}
if (captureHwParams)
{
snd_pcm_hw_params_free(captureHwParams);
captureHwParams = nullptr;
}
if (playbackHandle)
{
snd_pcm_close(playbackHandle);
playbackHandle = nullptr;
}
if (captureHandle)
{
snd_pcm_close(captureHandle);
captureHandle = nullptr;
}
return result; return result;
} }
@@ -2176,4 +2198,9 @@ namespace pipedal
} }
#endif #endif
} }
void FreeAlsaGlobals()
{
snd_config_update_free_global(); // to get a clean Valgrind report.
}
} // namespace } // namespace
+2
View File
@@ -40,5 +40,7 @@ namespace pipedal {
// test only. // test only.
void AlsaFormatEncodeDecodeTest(AudioDriverHost*driverHost); void AlsaFormatEncodeDecodeTest(AudioDriverHost*driverHost);
void MidiDecoderTest(); void MidiDecoderTest();
void FreeAlsaGlobals(); // for valgrind. Free the Alsa configuration cache.
} }
+4 -2
View File
@@ -1511,8 +1511,10 @@ public:
if (property != nullptr && value != nullptr && property->type == uris.atom_URID) if (property != nullptr && value != nullptr && property->type == uris.atom_URID)
{ {
LV2_URID propertyUrid = ((LV2_Atom_URID *)property)->body; LV2_URID propertyUrid = ((LV2_Atom_URID *)property)->body;
this->pNotifyCallbacks->OnPatchSetReply(instanceId, propertyUrid, value); if (this->pNotifyCallbacks)
// this->pNotifyCallbacks->OnNotifyMaybeLv2StateChanged(instanceId); {
this->pNotifyCallbacks->OnPatchSetReply(instanceId, propertyUrid, value);
}
} }
} }
} }
+4 -1
View File
@@ -2239,7 +2239,10 @@ void PiPedalModel::OnPatchSetReply(uint64_t instanceId, LV2_URID patchSetPropert
} }
} }
} }
audioHost->SetListenForAtomOutput(atomOutputListeners.size() != 0); if (audioHost)
{
audioHost->SetListenForAtomOutput(atomOutputListeners.size() != 0);
}
} }
void PiPedalModel::OnNotifyPathPatchPropertyReceived( void PiPedalModel::OnNotifyPathPatchPropertyReceived(
+6 -3
View File
@@ -828,7 +828,10 @@ Lv2PluginInfo::Lv2PluginInfo(PluginHost *lv2Host, LilvWorld *pWorld, const LilvP
std::string bundleUri = bundleUriNode.AsUri(); std::string bundleUri = bundleUriNode.AsUri();
std::string bundlePath = lilv_file_uri_parse(bundleUri.c_str(), nullptr); char *lilvBundlePath = lilv_file_uri_parse(bundleUri.c_str(), nullptr);
std::string bundlePath = lilvBundlePath;
lilv_free(lilvBundlePath);
if (bundlePath.length() == 0) if (bundlePath.length() == 0)
throw std::logic_error("Bundle uri is not a file uri."); throw std::logic_error("Bundle uri is not a file uri.");
@@ -1655,9 +1658,9 @@ Lv2PortGroup::Lv2PortGroup(PluginHost *lv2Host, const std::string &groupUri)
this->uri_ = groupUri; this->uri_ = groupUri;
AutoLilvNode uri = lilv_new_uri(pWorld, groupUri.c_str()); AutoLilvNode uri = lilv_new_uri(pWorld, groupUri.c_str());
LilvNode *symbolNode = lilv_world_get(pWorld, uri, lv2Host->lilvUris->lv2core__symbol, nullptr); AutoLilvNode symbolNode = lilv_world_get(pWorld, uri, lv2Host->lilvUris->lv2core__symbol, nullptr);
symbol_ = nodeAsString(symbolNode); symbol_ = nodeAsString(symbolNode);
LilvNode *nameNode = lilv_world_get(pWorld, uri, lv2Host->lilvUris->lv2core__name, nullptr); AutoLilvNode nameNode = lilv_world_get(pWorld, uri, lv2Host->lilvUris->lv2core__name, nullptr);
name_ = nodeAsString(nameNode); name_ = nodeAsString(nameNode);
} }
+3 -2
View File
@@ -39,6 +39,7 @@
#include "ofstream_synced.hpp" #include "ofstream_synced.hpp"
#include "ModTemplateGenerator.hpp" #include "ModTemplateGenerator.hpp"
#include <mutex> #include <mutex>
#include "WebServer.hpp" #include "WebServer.hpp"
@@ -685,7 +686,7 @@ namespace pipedal
int threads = 1; int threads = 1;
size_t maxUploadSize = 512 * 1024 * 1024; size_t maxUploadSize = 512 * 1024 * 1024;
std::thread *pBgThread = nullptr; std::unique_ptr<std::thread> pBgThread;
std::recursive_mutex io_mutex; std::recursive_mutex io_mutex;
boost::asio::io_context *pIoContext = nullptr; boost::asio::io_context *pIoContext = nullptr;
@@ -1417,7 +1418,7 @@ namespace pipedal
throw std::runtime_error("Bad state."); throw std::runtime_error("Bad state.");
} }
this->signalOnDone = signalOnDone; this->signalOnDone = signalOnDone;
this->pBgThread = new std::thread(ThreadProc, this); this->pBgThread = std::make_unique<std::thread>(ThreadProc, this);
} }
virtual void DisplayIpAddresses() override; virtual void DisplayIpAddresses() override;
+3
View File
@@ -41,6 +41,7 @@
#include "HtmlHelper.hpp" #include "HtmlHelper.hpp"
#include <thread> #include <thread>
#include <atomic> #include <atomic>
#include "AlsaDriver.hpp"
#include <signal.h> #include <signal.h>
#include <semaphore.h> #include <semaphore.h>
@@ -422,6 +423,8 @@ int main(int argc, char *argv[])
} }
Lv2Log::info("Shutdown complete."); Lv2Log::info("Shutdown complete.");
FreeAlsaGlobals();
if (systemd) if (systemd)
{ {
sd_notify(0, "STOPPING=1"); sd_notify(0, "STOPPING=1");
Executable
+1
View File
@@ -0,0 +1 @@
valgrind --leak-check=full --log-file=vg.output ./build/src/pipedald /etc/pipedal/config ./vite/dist -port 0.0.0.0:8080 -log-level debug
+146
View File
@@ -0,0 +1,146 @@
==5249== Memcheck, a memory error detector
==5249== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==5249== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==5249== Command: ./build/src/pipedald /etc/pipedal/config ./vite/dist -port 0.0.0.0:8080 -log-level debug
==5249== Parent PID: 5248
==5249==
==5249==
==5249== HEAP SUMMARY:
==5249== in use at exit: 88,737 bytes in 474 blocks
==5249== total heap usage: 662,523 allocs, 662,049 frees, 52,720,309 bytes allocated
==5249==
==5249== 22 bytes in 1 blocks are definitely lost in loss record 11 of 102
==5249== at 0x48850C8: malloc (vg_replace_malloc.c:381)
==5249== by 0x61DC32F: ???
==5249== by 0x61BFFC3: ???
==5249== by 0x61C01DB: ???
==5249== by 0x61BF9D7: ???
==5249== by 0x61C0267: ???
==5249== by 0x61C0677: ???
==5249== by 0x61C0C1B: ???
==5249== by 0x61C0C47: ???
==5249== by 0x5F143DB: ???
==5249== by 0x5F14613: ???
==5249== by 0x6046B87: ???
==5249==
==5249== 56 bytes in 1 blocks are definitely lost in loss record 45 of 102
==5249== at 0x48850C8: malloc (vg_replace_malloc.c:381)
==5249== by 0x6233FC7: ???
==5249== by 0x6232503: ???
==5249== by 0x6233197: ???
==5249== by 0x6233343: ???
==5249== by 0x6233AB7: ???
==5249== by 0x5F14453: ???
==5249== by 0x5F14613: ???
==5249== by 0x6046B87: ???
==5249== by 0x5EFD7B7: ???
==5249== by 0x5EFE143: ???
==5249== by 0x60467A7: ???
==5249==
==5249== 88 bytes in 1 blocks are definitely lost in loss record 52 of 102
==5249== at 0x48850C8: malloc (vg_replace_malloc.c:381)
==5249== by 0x625EF8B: ???
==5249== by 0x61CD1E7: ???
==5249== by 0x61CD3AF: ???
==5249== by 0x61CD46B: ???
==5249== by 0x5F1C0E7: ???
==5249== by 0x5F0A637: ???
==5249== by 0x5F143AB: ???
==5249== by 0x5F14613: ???
==5249== by 0x6046B87: ???
==5249== by 0x5EFD7B7: ???
==5249== by 0x5EFE143: ???
==5249==
==5249== 3,352 (80 direct, 3,272 indirect) bytes in 1 blocks are definitely lost in loss record 89 of 102
==5249== at 0x48850C8: malloc (vg_replace_malloc.c:381)
==5249== by 0x6235507: ???
==5249== by 0x61BFFEB: ???
==5249== by 0x61C01DB: ???
==5249== by 0x61BF9D7: ???
==5249== by 0x61C0267: ???
==5249== by 0x61C0677: ???
==5249== by 0x61C0C1B: ???
==5249== by 0x61C0C47: ???
==5249== by 0x5F143DB: ???
==5249== by 0x5F14613: ???
==5249== by 0x6046B87: ???
==5249==
==5249== 3,709 (80 direct, 3,629 indirect) bytes in 1 blocks are definitely lost in loss record 91 of 102
==5249== at 0x48850C8: malloc (vg_replace_malloc.c:381)
==5249== by 0x6235507: ???
==5249== by 0x626268B: ???
==5249== by 0x604751B: ???
==5249== by 0x624C53B: ???
==5249== by 0x6046AA7: ???
==5249== by 0x6046C17: ???
==5249== by 0x5EFD7B7: ???
==5249== by 0x5EFE143: ???
==5249== by 0x60467A7: ???
==5249== by 0x1B727F: CollatorImpl::CollatorImpl(std::shared_ptr<LocaleImpl>, char const*) (Locale.cpp:385)
==5249== by 0x1B7717: LocaleImpl::GetCollator() (Locale.cpp:444)
==5249==
==5249== 3,950 (56 direct, 3,894 indirect) bytes in 1 blocks are definitely lost in loss record 92 of 102
==5249== at 0x48850C8: malloc (vg_replace_malloc.c:381)
==5249== by 0x625EF8B: ???
==5249== by 0x624BE7B: ???
==5249== by 0x60460BF: ???
==5249== by 0x6046C0B: ???
==5249== by 0x5EFD7B7: ???
==5249== by 0x5EFE143: ???
==5249== by 0x60467A7: ???
==5249== by 0x1B727F: CollatorImpl::CollatorImpl(std::shared_ptr<LocaleImpl>, char const*) (Locale.cpp:385)
==5249== by 0x1B7717: LocaleImpl::GetCollator() (Locale.cpp:444)
==5249== by 0x156B67: main (main.cpp:303)
==5249==
==5249== 4,264 bytes in 1 blocks are definitely lost in loss record 99 of 102
==5249== at 0x48850C8: malloc (vg_replace_malloc.c:381)
==5249== by 0x625EFDF: ???
==5249== by 0x61C063F: ???
==5249== by 0x61C0C1B: ???
==5249== by 0x61C0C47: ???
==5249== by 0x5F143DB: ???
==5249== by 0x5F14613: ???
==5249== by 0x6046B87: ???
==5249== by 0x5EFD7B7: ???
==5249== by 0x5EFE143: ???
==5249== by 0x60467A7: ???
==5249== by 0x1B727F: CollatorImpl::CollatorImpl(std::shared_ptr<LocaleImpl>, char const*) (Locale.cpp:385)
==5249==
==5249== 5,804 (256 direct, 5,548 indirect) bytes in 1 blocks are definitely lost in loss record 100 of 102
==5249== at 0x48850C8: malloc (vg_replace_malloc.c:381)
==5249== by 0x625EF8B: ???
==5249== by 0x5F143CF: ???
==5249== by 0x5F14613: ???
==5249== by 0x6046B87: ???
==5249== by 0x5EFD7B7: ???
==5249== by 0x5EFE143: ???
==5249== by 0x60467A7: ???
==5249== by 0x1B727F: CollatorImpl::CollatorImpl(std::shared_ptr<LocaleImpl>, char const*) (Locale.cpp:385)
==5249== by 0x1B7717: LocaleImpl::GetCollator() (Locale.cpp:444)
==5249== by 0x156B67: main (main.cpp:303)
==5249==
==5249== 7,733 bytes in 276 blocks are definitely lost in loss record 101 of 102
==5249== at 0x488A1C4: realloc (vg_replace_malloc.c:1437)
==5249== by 0x5912A2B: serd_chunk_sink (in /usr/lib/aarch64-linux-gnu/libserd-0.so.0.30.16)
==5249== by 0x5912A87: serd_chunk_sink_finish (in /usr/lib/aarch64-linux-gnu/libserd-0.so.0.30.16)
==5249== by 0x590DA67: serd_file_uri_parse (in /usr/lib/aarch64-linux-gnu/libserd-0.so.0.30.16)
==5249== by 0x470DE3: pipedal::Lv2PluginInfo::Lv2PluginInfo(pipedal::PluginHost*, LilvWorldImpl*, LilvPluginImpl const*) (PluginHost.cpp:831)
==5249== by 0x49D8F7: void std::_Construct<pipedal::Lv2PluginInfo, pipedal::PluginHost*, LilvWorldImpl*&, LilvPluginImpl const*&>(pipedal::Lv2PluginInfo*, pipedal::PluginHost*&&, LilvWorldImpl*&, LilvPluginImpl const*&) (stl_construct.h:119)
==5249== by 0x49A61F: void std::allocator_traits<std::allocator<void> >::construct<pipedal::Lv2PluginInfo, pipedal::PluginHost*, LilvWorldImpl*&, LilvPluginImpl const*&>(std::allocator<void>&, pipedal::Lv2PluginInfo*, pipedal::PluginHost*&&, LilvWorldImpl*&, LilvPluginImpl const*&) (alloc_traits.h:635)
==5249== by 0x496C5F: std::_Sp_counted_ptr_inplace<pipedal::Lv2PluginInfo, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<pipedal::PluginHost*, LilvWorldImpl*&, LilvPluginImpl const*&>(std::allocator<void>, pipedal::PluginHost*&&, LilvWorldImpl*&, LilvPluginImpl const*&) (shared_ptr_base.h:604)
==5249== by 0x48F12B: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<pipedal::Lv2PluginInfo, std::allocator<void>, pipedal::PluginHost*, LilvWorldImpl*&, LilvPluginImpl const*&>(pipedal::Lv2PluginInfo*&, std::_Sp_alloc_shared_tag<std::allocator<void> >, pipedal::PluginHost*&&, LilvWorldImpl*&, LilvPluginImpl const*&) (shared_ptr_base.h:971)
==5249== by 0x488A3B: std::__shared_ptr<pipedal::Lv2PluginInfo, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>, pipedal::PluginHost*, LilvWorldImpl*&, LilvPluginImpl const*&>(std::_Sp_alloc_shared_tag<std::allocator<void> >, pipedal::PluginHost*&&, LilvWorldImpl*&, LilvPluginImpl const*&) (shared_ptr_base.h:1712)
==5249== by 0x482803: std::shared_ptr<pipedal::Lv2PluginInfo>::shared_ptr<std::allocator<void>, pipedal::PluginHost*, LilvWorldImpl*&, LilvPluginImpl const*&>(std::_Sp_alloc_shared_tag<std::allocator<void> >, pipedal::PluginHost*&&, LilvWorldImpl*&, LilvPluginImpl const*&) (shared_ptr.h:464)
==5249== by 0x47E363: std::shared_ptr<pipedal::Lv2PluginInfo> std::make_shared<pipedal::Lv2PluginInfo, pipedal::PluginHost*, LilvWorldImpl*&, LilvPluginImpl const*&>(pipedal::PluginHost*&&, LilvWorldImpl*&, LilvPluginImpl const*&) (shared_ptr.h:1010)
==5249==
==5249== LEAK SUMMARY:
==5249== definitely lost: 12,635 bytes in 284 blocks
==5249== indirectly lost: 16,343 bytes in 30 blocks
==5249== possibly lost: 0 bytes in 0 blocks
==5249== still reachable: 59,759 bytes in 160 blocks
==5249== suppressed: 0 bytes in 0 blocks
==5249== Reachable blocks (those to which a pointer was found) are not shown.
==5249== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==5249==
==5249== For lists of detected and suppressed errors, rerun with: -s
==5249== ERROR SUMMARY: 9 errors from 9 contexts (suppressed: 0 from 0)