From d4b84b396b4adcd91706de9c6ebc8b75b53d680b Mon Sep 17 00:00:00 2001 From: Vladimir Sadovnikov Date: Fri, 6 Dec 2024 23:14:26 +0300 Subject: [PATCH] Added Stop button for stopping audio file preview --- CHANGELOG | 2 +- include/private/plugins/impulse_reverb.h | 3 ++ .../ui/convolution/impulse_reverb/mono.xml | 9 +++- .../ui/convolution/impulse_reverb/stereo.xml | 9 +++- src/doc/manuals/plugins/impulse_reverb.php | 3 +- src/main/meta/impulse_reverb.cpp | 3 +- src/main/plug/impulse_reverb.cpp | 50 ++++++++++++++++--- 7 files changed, 66 insertions(+), 13 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d6ca1dd..840efd6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,7 +3,7 @@ ******************************************************************************* === 1.0.24 === - +* Added Stop button for stopping audio file preview. === 1.0.23 === * Updated build scripts and dependencies. diff --git a/include/private/plugins/impulse_reverb.h b/include/private/plugins/impulse_reverb.h index bc895ea..6dd4d6d 100644 --- a/include/private/plugins/impulse_reverb.h +++ b/include/private/plugins/impulse_reverb.h @@ -98,6 +98,7 @@ namespace lsp typedef struct af_descriptor_t { dspu::Toggle sListen; // Listen toggle + dspu::Toggle sStop; // Stop toggle dspu::Sample *pOriginal; // Original audio file dspu::Sample *pProcessed; // Processed audio file for sampler float *vThumbs[meta::impulse_reverb_metadata::TRACKS_MAX]; // Thumbnails @@ -120,6 +121,7 @@ namespace lsp plug::IPort *pFadeIn; plug::IPort *pFadeOut; plug::IPort *pListen; + plug::IPort *pStop; plug::IPort *pReverse; // Reverse plug::IPort *pStatus; // Status of file loading plug::IPort *pLength; // Length of file @@ -155,6 +157,7 @@ namespace lsp dspu::Bypass sBypass; dspu::SamplePlayer sPlayer; dspu::Equalizer sEqualizer; // Wet signal equalizer + dspu::Playback vPlaybacks[meta::impulse_reverb_metadata::FILES]; // Playbacks float *vOut; float *vBuffer; // Rendering buffer diff --git a/res/main/ui/convolution/impulse_reverb/mono.xml b/res/main/ui/convolution/impulse_reverb/mono.xml index 85d2937..a986205 100644 --- a/res/main/ui/convolution/impulse_reverb/mono.xml +++ b/res/main/ui/convolution/impulse_reverb/mono.xml @@ -117,7 +117,14 @@ -