diff --git a/.gitignore b/.gitignore
index 8396632..8a7df12 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,4 +12,5 @@ react/package-lock.json
src/dbus/bluez_adaptor.h
src/dbus/bluez_proxy.h
-CMakeFiles
\ No newline at end of file
+CMakeFiles
+vg.output
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6faa786..a806e82 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,13 +1,13 @@
cmake_minimum_required(VERSION 3.16.0)
project(pipedal
- VERSION 1.4.86
+ VERSION 1.4.87
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.86-Experimental")
+set (DISPLAY_VERSION "PiPedal v1.4.87-Experimental")
set (PACKAGE_ARCHITECTURE ${DEBIAN_ARCHITECTURE})
set (CMAKE_INSTALL_PREFIX "/usr/")
diff --git a/README.md b/README.md
index f0305c1..dab3cf7 100644
--- a/README.md
+++ b/README.md
@@ -9,11 +9,11 @@
-Download: v1.4.86
+Download: v1.4.87
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.86 Release. See the [release notes](https://rerdavies.github.io/pipedal/ReleaseNotes) for details. New Phaser and Graphic Equalizer plugins.
+#### NEW version 1.4.87 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 955c485..5e984e9 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.86](https://github.com/rerdavies/pipedal/releases/download/v1.4.86/pipedal_1.4.86_arm64.deb)
-- [Ubuntu 24.x (aarch64) v1.4.86](https://github.com/rerdavies/pipedal/releases/download/v1.4.86/pipedal_1.4.86_arm64.deb)
-- [Ubuntu 24.x (amd64) v1.4.86](https://github.com/rerdavies/pipedal/releases/download/v1.4.86/pipedal_1.4.86_amd64.deb)
+- [Raspberry Pi OS bookworm (aarch64) v1.4.87](https://github.com/rerdavies/pipedal/releases/download/v1.4.87/pipedal_1.4.87_arm64.deb)
+- [Ubuntu 24.x (aarch64) v1.4.87](https://github.com/rerdavies/pipedal/releases/download/v1.4.87/pipedal_1.4.87_arm64.deb)
+- [Ubuntu 24.x (amd64) v1.4.87](https://github.com/rerdavies/pipedal/releases/download/v1.4.87/pipedal_1.4.87_amd64.deb)
-Version 1.4.86 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.87 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.86_arm64.deb
+ sudo apt-get install ./pipedal_1.4.87_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 a18618f..fa5c185 100644
--- a/docs/ReleaseNotes.md
+++ b/docs/ReleaseNotes.md
@@ -1,14 +1,18 @@
# Release Notes
-## PiPedal 1.4.86 Beta
+## PiPedal 1.4.87 Beta
The Big Feature:
-- Code optimizations for Raspberry Pi 5 (Cortex-A76), providing a potential 2x performance improvement for TooB Neural Amp Modeler.
+- Code optimizations for Raspberry Pi 5 (Cortex-A76), providing substantial performance improvements for TooB Neural Amp Modeler.
- New "Threaded" button optionally executes TooB NAM computation on a separate thread. Allows up to 5 NAM instances on Pi 4, and practically unlimited NAM instances on Pi 5.
- TooB Neural Amp Modeler: Switch to the NeuralAudio NAM Backend
Bug fixes:
- Compatibility with plugins expecting certain MOD host features.
- Improvements to recovery from audio underruns and overruns.
- Fixes for loss of currently selected plugin when modifying pedalboard structure.
+- Fixes for TooB NAM lockups when using 16- and 32-sample buffer sizes.
+- Fixes for performance issues with TooB NAM when using 16- and 32-sample buffer sizes.
+- Fixes for volume adjustments in TooB NAM.
+(A re-issue of 1.4.86)
## Pipedal 1.4.79 Beta
The Big Feature:
diff --git a/docs/download.md b/docs/download.md
index 372c013..18e4e84 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.86 Beta](https://github.com/rerdavies/pipedal/releases/download/v1.4.86/pipedal_1.4.86_arm64.deb)
-- [Ubuntu 24.x (aarch64) v1.4.86 Alpha](https://github.com/rerdavies/pipedal/releases/download/v1.4.86/pipedal_1.4.86_arm64.deb)
-- [Ubuntu 24.x (amd64) v1.4.86 Alpha](https://github.com/rerdavies/pipedal/releases/download/v1.4.86/pipedal_1.4.86_amd64.deb)
+- [Raspberry Pi OS bookworm (aarch64) v1.4.87 Beta](https://github.com/rerdavies/pipedal/releases/download/v1.4.87/pipedal_1.4.87_arm64.deb)
+- [Ubuntu 24.x (aarch64) v1.4.87 Alpha](https://github.com/rerdavies/pipedal/releases/download/v1.4.87/pipedal_1.4.87_arm64.deb)
+- [Ubuntu 24.x (amd64) v1.4.87 Alpha](https://github.com/rerdavies/pipedal/releases/download/v1.4.87/pipedal_1.4.87_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.86_arm64.deb
+ sudo apt-get install ./pipedal_1.4.87_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/lv2/aarch64/ToobAmp.lv2/CabIR.ttl b/lv2/aarch64/ToobAmp.lv2/CabIR.ttl
index 1a9348a..bcbff27 100644
--- a/lv2/aarch64/ToobAmp.lv2/CabIR.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/CabIR.ttl
@@ -93,7 +93,7 @@ cabir:impulseFile3
doap:license ;
doap:maintainer ;
lv2:minorVersion 0 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
rdfs:comment """
TooB Cab IR is a convolution-based guitar cabinet impulse response simulator.
diff --git a/lv2/aarch64/ToobAmp.lv2/CabSim.ttl b/lv2/aarch64/ToobAmp.lv2/CabSim.ttl
index 512f8c0..8662607 100644
--- a/lv2/aarch64/ToobAmp.lv2/CabSim.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/CabSim.ttl
@@ -50,7 +50,7 @@ toob:frequencyResponseVector
doap:license ;
doap:maintainer ;
lv2:minorVersion 0 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
mod:brand "TooB";
mod:label "TooB CabSim";
diff --git a/lv2/aarch64/ToobAmp.lv2/ConvolutionReverb.ttl b/lv2/aarch64/ToobAmp.lv2/ConvolutionReverb.ttl
index 23918a1..3bc61e2 100644
--- a/lv2/aarch64/ToobAmp.lv2/ConvolutionReverb.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/ConvolutionReverb.ttl
@@ -53,7 +53,7 @@ toobimpulse:impulseFile
doap:license ;
doap:maintainer ;
lv2:minorVersion 0 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
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
diff --git a/lv2/aarch64/ToobAmp.lv2/ConvolutionReverbStereo.ttl b/lv2/aarch64/ToobAmp.lv2/ConvolutionReverbStereo.ttl
index c09b552..9081fc8 100644
--- a/lv2/aarch64/ToobAmp.lv2/ConvolutionReverbStereo.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/ConvolutionReverbStereo.ttl
@@ -51,7 +51,7 @@ toobimpulse:impulseFile
doap:license ;
doap:maintainer ;
lv2:minorVersion 0 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
rdfs:comment """
diff --git a/lv2/aarch64/ToobAmp.lv2/InputStage.ttl b/lv2/aarch64/ToobAmp.lv2/InputStage.ttl
index 76ea7d7..00acdd3 100644
--- a/lv2/aarch64/ToobAmp.lv2/InputStage.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/InputStage.ttl
@@ -66,7 +66,7 @@ inputStage:filterGroup
doap:license ;
doap:maintainer ;
lv2:minorVersion 0 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
mod:brand "TooB";
mod:label "TooB Input";
diff --git a/lv2/aarch64/ToobAmp.lv2/PowerStage2.ttl b/lv2/aarch64/ToobAmp.lv2/PowerStage2.ttl
index d6c6c1f..732ce7c 100644
--- a/lv2/aarch64/ToobAmp.lv2/PowerStage2.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/PowerStage2.ttl
@@ -68,7 +68,7 @@ pstage:stage3
doap:license ;
doap:maintainer ;
lv2:minorVersion 0 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
mod:brand "TooB";
mod:label "Power Stage";
diff --git a/lv2/aarch64/ToobAmp.lv2/SpectrumAnalyzer.ttl b/lv2/aarch64/ToobAmp.lv2/SpectrumAnalyzer.ttl
index 1a624a1..45cd63e 100644
--- a/lv2/aarch64/ToobAmp.lv2/SpectrumAnalyzer.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/SpectrumAnalyzer.ttl
@@ -57,7 +57,7 @@
doap:license ;
doap:maintainer ;
lv2:minorVersion 0 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
rdfs:comment "TooB spectrum analyzer" ;
mod:brand "TooB";
diff --git a/lv2/aarch64/ToobAmp.lv2/ToneStack.ttl b/lv2/aarch64/ToobAmp.lv2/ToneStack.ttl
index 7ef4d50..40894a4 100644
--- a/lv2/aarch64/ToobAmp.lv2/ToneStack.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/ToneStack.ttl
@@ -57,7 +57,7 @@ tonestack:eqGroup
doap:license ;
doap:maintainer ;
lv2:minorVersion 0 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
uiext:ui ;
diff --git a/lv2/aarch64/ToobAmp.lv2/ToobAmpUI.so b/lv2/aarch64/ToobAmp.lv2/ToobAmpUI.so
index 008c5d9..6e76393 100755
Binary files a/lv2/aarch64/ToobAmp.lv2/ToobAmpUI.so and b/lv2/aarch64/ToobAmp.lv2/ToobAmpUI.so differ
diff --git a/lv2/aarch64/ToobAmp.lv2/ToobChorus.ttl b/lv2/aarch64/ToobAmp.lv2/ToobChorus.ttl
index d330dc3..e4367a4 100644
--- a/lv2/aarch64/ToobAmp.lv2/ToobChorus.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/ToobChorus.ttl
@@ -40,7 +40,7 @@
doap:license ;
doap:maintainer ;
lv2:minorVersion 0 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
rdfs:comment """
Emulation of a Boss CE-2 Chorus.
diff --git a/lv2/aarch64/ToobAmp.lv2/ToobDelay.ttl b/lv2/aarch64/ToobAmp.lv2/ToobDelay.ttl
index b7743d6..9836d38 100644
--- a/lv2/aarch64/ToobAmp.lv2/ToobDelay.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/ToobDelay.ttl
@@ -41,7 +41,7 @@
doap:license ;
doap:maintainer ;
lv2:minorVersion 0 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
rdfs:comment """
A straightforward no-frills digital delay.
diff --git a/lv2/aarch64/ToobAmp.lv2/ToobFlanger.ttl b/lv2/aarch64/ToobAmp.lv2/ToobFlanger.ttl
index dc4437b..3f343fb 100644
--- a/lv2/aarch64/ToobAmp.lv2/ToobFlanger.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/ToobFlanger.ttl
@@ -41,7 +41,7 @@
doap:license ;
doap:maintainer ;
lv2:minorVersion 0 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
rdfs:comment """
Emulation of a Boss BF-2 Flanger, based on circuit analysis and simulation of the original.
diff --git a/lv2/aarch64/ToobAmp.lv2/ToobFlangerStereo.ttl b/lv2/aarch64/ToobAmp.lv2/ToobFlangerStereo.ttl
index 9974648..a7361cb 100644
--- a/lv2/aarch64/ToobAmp.lv2/ToobFlangerStereo.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/ToobFlangerStereo.ttl
@@ -41,7 +41,7 @@
doap:license ;
doap:maintainer ;
lv2:minorVersion 0 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
rdfs:comment """
Digital emulation of a Boss BF-2 Flanger.
diff --git a/lv2/aarch64/ToobAmp.lv2/ToobFreeverb.ttl b/lv2/aarch64/ToobAmp.lv2/ToobFreeverb.ttl
index 2066069..11b4969 100644
--- a/lv2/aarch64/ToobAmp.lv2/ToobFreeverb.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/ToobFreeverb.ttl
@@ -41,7 +41,7 @@
doap:license ;
doap:maintainer ;
lv2:minorVersion 0 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
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.
diff --git a/lv2/aarch64/ToobAmp.lv2/ToobGraphicEq.ttl b/lv2/aarch64/ToobAmp.lv2/ToobGraphicEq.ttl
index 0ecc35f..0b72911 100644
--- a/lv2/aarch64/ToobAmp.lv2/ToobGraphicEq.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/ToobGraphicEq.ttl
@@ -41,7 +41,7 @@
doap:license ;
doap:maintainer ;
lv2:minorVersion 0 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
rdfs:comment """
A 7 octave graphic equalizer, with frequencies chosen to be useful for EQ-ing guitar signals.
""" ;
diff --git a/lv2/aarch64/ToobAmp.lv2/ToobLooperFour.ttl b/lv2/aarch64/ToobAmp.lv2/ToobLooperFour.ttl
index 73287e9..e65ad11 100644
--- a/lv2/aarch64/ToobAmp.lv2/ToobLooperFour.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/ToobLooperFour.ttl
@@ -92,7 +92,7 @@ myprefix:output_group
doap:license ;
doap:maintainer ;
lv2:minorVersion 1 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
ui:ui ;
diff --git a/lv2/aarch64/ToobAmp.lv2/ToobLooperOne.ttl b/lv2/aarch64/ToobAmp.lv2/ToobLooperOne.ttl
index b1cfa06..b4c16b0 100644
--- a/lv2/aarch64/ToobAmp.lv2/ToobLooperOne.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/ToobLooperOne.ttl
@@ -78,7 +78,7 @@ myprefix:output_group
doap:license ;
doap:maintainer ;
lv2:minorVersion 1 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
ui:ui ;
diff --git a/lv2/aarch64/ToobAmp.lv2/ToobML.ttl b/lv2/aarch64/ToobAmp.lv2/ToobML.ttl
index 2c6ecb3..1074221 100644
--- a/lv2/aarch64/ToobAmp.lv2/ToobML.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/ToobML.ttl
@@ -67,7 +67,7 @@ toobml:sagGroup
doap:license ;
doap:maintainer ;
lv2:minorVersion 0 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
rdfs:comment """
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.
diff --git a/lv2/aarch64/ToobAmp.lv2/ToobMix.ttl b/lv2/aarch64/ToobAmp.lv2/ToobMix.ttl
index f85beb6..c65311a 100644
--- a/lv2/aarch64/ToobAmp.lv2/ToobMix.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/ToobMix.ttl
@@ -40,7 +40,7 @@
doap:license ;
doap:maintainer ;
lv2:minorVersion 0 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
rdfs:comment """
Remix a stereo input signal.
diff --git a/lv2/aarch64/ToobAmp.lv2/ToobNeuralAmpModeler.ttl b/lv2/aarch64/ToobAmp.lv2/ToobNeuralAmpModeler.ttl
index 8cee2d3..871b767 100644
--- a/lv2/aarch64/ToobAmp.lv2/ToobNeuralAmpModeler.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/ToobNeuralAmpModeler.ttl
@@ -61,7 +61,7 @@ toobNam:eqGroup
doap:license ;
doap:maintainer ;
lv2:minorVersion 0 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
rdfs:comment """
TooB Neural Amp Modeler is a neural network based Amp Simulator. It uses .nam model files that are generated by training nueral networks
on audio recordings of actual guitar amps, effects pedals and other equipment. .nam files contain data from the trained models, which can be loaded into
diff --git a/lv2/aarch64/ToobAmp.lv2/ToobNoiseGate.ttl b/lv2/aarch64/ToobAmp.lv2/ToobNoiseGate.ttl
index 6bc719f..bc35395 100644
--- a/lv2/aarch64/ToobAmp.lv2/ToobNoiseGate.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/ToobNoiseGate.ttl
@@ -54,7 +54,7 @@ noisegate:envelope_group
doap:license ;
doap:maintainer ;
lv2:minorVersion 0 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
rdfs:comment """
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.
diff --git a/lv2/aarch64/ToobAmp.lv2/ToobPhaser.ttl b/lv2/aarch64/ToobAmp.lv2/ToobPhaser.ttl
index db9c38e..a3844ca 100644
--- a/lv2/aarch64/ToobAmp.lv2/ToobPhaser.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/ToobPhaser.ttl
@@ -40,7 +40,7 @@
doap:license ;
doap:maintainer ;
lv2:minorVersion 0 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
rdfs:comment """
A loose emulation of an MXR® Phase 90 Phaser.
diff --git a/lv2/aarch64/ToobAmp.lv2/ToobPlayer.ttl b/lv2/aarch64/ToobAmp.lv2/ToobPlayer.ttl
index dc49767..c1f9b3c 100644
--- a/lv2/aarch64/ToobAmp.lv2/ToobPlayer.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/ToobPlayer.ttl
@@ -60,7 +60,7 @@ toobPlayer:seek
doap:license ;
doap:maintainer ;
lv2:minorVersion 0 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
rdfs:comment """
Play audio files. Audio files can optionally be loooped by pressing the "Set loop" button.
diff --git a/lv2/aarch64/ToobAmp.lv2/ToobRecordMono.ttl b/lv2/aarch64/ToobAmp.lv2/ToobRecordMono.ttl
index d7d7efa..12a869e 100644
--- a/lv2/aarch64/ToobAmp.lv2/ToobRecordMono.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/ToobRecordMono.ttl
@@ -51,7 +51,7 @@ recordPrefix:audioFile
doap:license ;
doap:maintainer ;
lv2:minorVersion 1 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
ui:ui ;
diff --git a/lv2/aarch64/ToobAmp.lv2/ToobRecordStereo.ttl b/lv2/aarch64/ToobAmp.lv2/ToobRecordStereo.ttl
index c013b8d..30616a1 100644
--- a/lv2/aarch64/ToobAmp.lv2/ToobRecordStereo.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/ToobRecordStereo.ttl
@@ -88,7 +88,7 @@ myprefix:loop3_group
doap:license ;
doap:maintainer ;
lv2:minorVersion 1 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
ui:ui ;
diff --git a/lv2/aarch64/ToobAmp.lv2/ToobTuner.ttl b/lv2/aarch64/ToobAmp.lv2/ToobTuner.ttl
index 3f58b62..931a0f9 100644
--- a/lv2/aarch64/ToobAmp.lv2/ToobTuner.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/ToobTuner.ttl
@@ -40,7 +40,7 @@
doap:license ;
doap:maintainer ;
lv2:minorVersion 0 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
rdfs:comment """
TooB Tuner is a chromatic guitar tuner.
""" ;
diff --git a/lv2/aarch64/ToobAmp.lv2/ToobVolume.ttl b/lv2/aarch64/ToobAmp.lv2/ToobVolume.ttl
index 97047aa..c83f830 100644
--- a/lv2/aarch64/ToobAmp.lv2/ToobVolume.ttl
+++ b/lv2/aarch64/ToobAmp.lv2/ToobVolume.ttl
@@ -39,7 +39,7 @@
doap:license ;
doap:maintainer ;
lv2:minorVersion 0 ;
- lv2:microVersion 66 ;
+ lv2:microVersion 67 ;
rdfs:comment """
Volume control.
diff --git a/lv2/aarch64/ToobAmp.lv2/bin/ToobAmp-a72.so b/lv2/aarch64/ToobAmp.lv2/bin/ToobAmp-a72.so
index 1702ce2..ff52163 100755
Binary files a/lv2/aarch64/ToobAmp.lv2/bin/ToobAmp-a72.so and b/lv2/aarch64/ToobAmp.lv2/bin/ToobAmp-a72.so differ
diff --git a/lv2/aarch64/ToobAmp.lv2/bin/ToobAmp-a76.so b/lv2/aarch64/ToobAmp.lv2/bin/ToobAmp-a76.so
index 1335f65..1757999 100755
Binary files a/lv2/aarch64/ToobAmp.lv2/bin/ToobAmp-a76.so and b/lv2/aarch64/ToobAmp.lv2/bin/ToobAmp-a76.so differ
diff --git a/lv2/x86_64/toobamp_1.1.66_amd64.deb b/lv2/x86_64/toobamp_1.1.67_amd64.deb
similarity index 57%
rename from lv2/x86_64/toobamp_1.1.66_amd64.deb
rename to lv2/x86_64/toobamp_1.1.67_amd64.deb
index aadcc89..bf66717 100644
Binary files a/lv2/x86_64/toobamp_1.1.66_amd64.deb and b/lv2/x86_64/toobamp_1.1.67_amd64.deb differ
diff --git a/src/AlsaDriver.cpp b/src/AlsaDriver.cpp
index bcf3871..f00461e 100644
--- a/src/AlsaDriver.cpp
+++ b/src/AlsaDriver.cpp
@@ -24,6 +24,7 @@
#include "pch.h"
#include "util.hpp"
+#include
#include "Finally.hpp"
#include
#include
@@ -56,6 +57,7 @@ using namespace pipedal;
namespace pipedal
{
+#define TRACE_BUFFER_POSITIONS 1
static bool ShouldForceStereoChannels(snd_pcm_t *pcmHandle, snd_pcm_hw_params_t *hwParams, unsigned int channelsMin, unsigned int channelsMax)
{
// The problem: old IC2 drivers seem to return 1-8 channels, but 8 channels is non-functinal. The assumption is that legacy drivers
@@ -245,7 +247,41 @@ namespace pipedal
class AlsaDriverImpl : public AudioDriver
{
private:
- void TraceBuffers(size_t framesInBuffers, char code = ' ');
+ struct BufferTrace
+ {
+ uint64_t time;
+ snd_pcm_sframes_t inAvail;
+ snd_pcm_sframes_t outAvail;
+ snd_pcm_sframes_t buffered;
+ snd_pcm_sframes_t total;
+ char code;
+ };
+
+ std::vector bufferTraces{1000};
+ size_t bufferTraceIndex = 0;
+
+ inline void TraceBufferPositions(size_t framesInBuffer, char code = ' ')
+ {
+#if TRACE_BUFFER_POSITIONS
+ uint64_t time = std::chrono::duration_cast(std::chrono::steady_clock::now().time_since_epoch()).count();
+ auto inAvail = snd_pcm_avail_update(this->captureHandle);
+ auto outAvail = snd_pcm_avail_update(this->playbackHandle);
+
+ auto total = inAvail + outAvail + framesInBuffer;
+ bufferTraces[bufferTraceIndex++] = {
+ time,
+ inAvail,
+ outAvail,
+ (snd_pcm_sframes_t)framesInBuffer,
+ (snd_pcm_sframes_t)total,
+ code};
+ if (bufferTraceIndex == bufferTraces.size())
+ {
+ bufferTraceIndex = 0;
+ }
+#endif
+ }
+
std::recursive_mutex restartMutex;
pipedal::CpuUse cpuUse;
@@ -257,8 +293,15 @@ namespace pipedal
#endif
uint32_t sampleRate = 0;
- uint32_t bufferSize;
- uint32_t numberOfBuffers;
+ uint32_t bufferSize = 0;
+ uint32_t numberOfBuffers = 0;
+
+ unsigned int capturePeriods = 0;
+ unsigned int playbackPeriods = 0;
+
+ uint32_t captureHardwarePeriodSize = 0;
+ uint32_t playbackHardwarePeriodSize = 0;
+ ;
int playbackChannels = 0;
int captureChannels = 0;
@@ -357,8 +400,6 @@ namespace pipedal
snd_pcm_t *playbackHandle = nullptr;
snd_pcm_t *captureHandle = nullptr;
- unsigned int periods = 0;
-
snd_pcm_hw_params_t *captureHwParams = nullptr;
snd_pcm_sw_params_t *captureSwParams = nullptr;
snd_pcm_hw_params_t *playbackHwParams = nullptr;
@@ -437,11 +478,14 @@ namespace pipedal
snd_pcm_hw_params_t *hwParams,
snd_pcm_sw_params_t *swParams,
int *channels,
- unsigned int *periods)
+ unsigned int *periods,
+ unsigned int *hwPeriodSize)
{
int err;
snd_pcm_uframes_t stop_th;
+ bool isCaptureStream = strcmp(streamType, "capture") == 0;
+
if ((err = snd_pcm_hw_params_any(handle, hwParams)) < 0)
{
AlsaError(SS("No playback configurations available (" << snd_strerror(err) << ")"));
@@ -513,7 +557,7 @@ namespace pipedal
{
AlsaError(SS("Can't set period size to " << this->bufferSize << " (" << alsa_device_name << "/" << streamType << ")"));
}
- this->bufferSize = effectivePeriodSize;
+ *hwPeriodSize = effectivePeriodSize;
*periods = this->numberOfBuffers;
dir = 0;
@@ -547,7 +591,7 @@ namespace pipedal
snd_pcm_sw_params_current(handle, swParams);
- if (handle == this->captureHandle)
+ if (isCaptureStream)
{
if ((err = snd_pcm_sw_params_set_start_threshold(handle, swParams,
0)) < 0)
@@ -564,7 +608,7 @@ namespace pipedal
}
}
- stop_th = *periods * this->bufferSize;
+ stop_th = *periods * *hwPeriodSize;
if (this->soft_mode)
{
stop_th = (snd_pcm_uframes_t)-1;
@@ -582,13 +626,19 @@ namespace pipedal
AlsaError(SS("Cannot set silence threshold for " << alsa_device_name));
}
- if (handle == this->playbackHandle)
+ if (!isCaptureStream)
+ {
+ // For playback, set avail_min to one buffer size to minimize latency
+ // while ensuring we have enough buffered data to prevent underruns
+ snd_pcm_uframes_t playback_avail_min = this->bufferSize;
err = snd_pcm_sw_params_set_avail_min(
- handle, swParams,
- this->bufferSize * (*periods - this->numberOfBuffers + 1));
+ handle, swParams, playback_avail_min);
+ }
else
+ {
err = snd_pcm_sw_params_set_avail_min(
handle, swParams, this->bufferSize);
+ }
if (err < 0)
{
@@ -636,7 +686,8 @@ namespace pipedal
captureHwParams,
captureSwParams,
&captureChannels,
- &this->periods);
+ &this->capturePeriods,
+ &this->captureHardwarePeriodSize);
}
if (this->playbackHandle)
{
@@ -647,7 +698,8 @@ namespace pipedal
playbackHwParams,
playbackSwParams,
&playbackChannels,
- &this->periods);
+ &this->playbackPeriods,
+ &this->playbackHardwarePeriodSize);
}
#ifdef ALSADRIVER_CONFIG_DBG
@@ -1186,8 +1238,8 @@ namespace pipedal
}
captureFrameSize = captureSampleSize * captureChannels;
- rawCaptureBuffer.resize(captureFrameSize * bufferSize);
- memset(rawCaptureBuffer.data(), 0, captureFrameSize * bufferSize);
+ rawCaptureBuffer.resize(captureFrameSize * bufferSize * 2);
+ memset(rawCaptureBuffer.data(), 0, rawCaptureBuffer.size());
AllocateBuffers(captureBuffers, captureChannels);
}
@@ -1401,17 +1453,22 @@ namespace pipedal
{
validate_capture_handle();
- memset(rawPlaybackBuffer.data(), 0, playbackFrameSize * bufferSize);
+ memset(rawPlaybackBuffer.data(), 0, rawPlaybackBuffer.size());
int retry = 0;
while (true)
{
auto avail = snd_pcm_avail(this->playbackHandle);
if (avail < 0)
{
+ if (avail == -EAGAIN)
+ {
+ return;
+ }
if (++retry >= 5) // kinda sus code. let's make sure we don't spin forever.
{
throw std::runtime_error("Timed out trying to fill the audio output buffer.");
}
+
int err = snd_pcm_prepare(playbackHandle);
if (err < 0)
{
@@ -1422,8 +1479,9 @@ namespace pipedal
}
if (avail == 0)
break;
- if (avail > this->bufferSize)
- avail = this->bufferSize;
+
+ if (avail * playbackFrameSize > this->rawPlaybackBuffer.size())
+ this->rawPlaybackBuffer.resize(avail * playbackFrameSize);
ssize_t err = WriteBuffer(playbackHandle, rawPlaybackBuffer.data(), avail);
if (err < 0)
@@ -1439,7 +1497,7 @@ namespace pipedal
try
{
- TraceBuffers(framesRead,'w');
+ TraceBufferPositions(framesRead, 'w');
if (err == -EPIPE)
{
err = snd_pcm_prepare(playback_handle);
@@ -1471,7 +1529,7 @@ namespace pipedal
try
{
- TraceBuffers(bufferedFrames,'r');
+ TraceBufferPositions(bufferedFrames, 'r');
if (err == -EPIPE)
{
@@ -1575,7 +1633,7 @@ namespace pipedal
{
snd_pcm_wait(captureHandle, 1);
}
- TraceBuffers(framesRead);
+ TraceBufferPositions(framesRead);
} while (frames > 0);
return framesRead;
}
@@ -1659,7 +1717,7 @@ namespace pipedal
int err;
if ((err = snd_pcm_start(captureHandle)) < 0)
{
- throw PiPedalStateException("Unable to start ALSA capture.");
+ throw PiPedalStateException(SS("Unable to start ALSA capture. " << snd_strerror(err)));
}
CrashGuardLock crashGuardLock;
@@ -1733,6 +1791,7 @@ namespace pipedal
this->driverHost->OnUnderrun();
recover_from_output_underrun(captureHandle, playbackHandle, err, framesRead);
+ framesRead = 0;
}
cpuUse.AddSample(ProfileCategory::Write);
}
@@ -2270,36 +2329,6 @@ namespace pipedal
#endif
}
- struct BufferTrace
- {
- snd_pcm_sframes_t inAvail;
- snd_pcm_sframes_t outAvail;
- snd_pcm_sframes_t buffered;
- snd_pcm_sframes_t total;
- char code;
- };
-
- std::vector bufferTraces(1000);
- size_t bufferTraceIndex;
-
- void AlsaDriverImpl::TraceBuffers(size_t framesInBuffer,char code)
- {
- auto inAvail = snd_pcm_avail_update(this->captureHandle);
- auto outAvail = snd_pcm_avail_update(this->playbackHandle);
-
- auto total = inAvail + outAvail + framesInBuffer;
- bufferTraces[bufferTraceIndex++] = {
- inAvail,
- outAvail,
- (snd_pcm_sframes_t)framesInBuffer,
- (snd_pcm_sframes_t)total,
- code};
- if (bufferTraceIndex == bufferTraces.size())
- {
- bufferTraceIndex = 0;
- }
- }
-
void FreeAlsaGlobals()
{
snd_config_update_free_global(); // to get a clean Valgrind report.