From b4af0d0ebfc03b7613758ee94694502a394011cd Mon Sep 17 00:00:00 2001 From: xenakios Date: Fri, 1 Jun 2018 14:20:01 +0300 Subject: [PATCH] Make audio source set play range immediately if it is set when the seek crossfade is active. This effectively disables the smoothed audio but this will have to do for now. The smoothed playback needs to be redesigned from scratch later. Revert the larger disk buffer size. Readme changes. --- Source/PS_Source/Input/AInputS.h | 7 ++++++- Source/PS_Source/StretchSource.cpp | 2 +- readme.txt | 7 +++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Source/PS_Source/Input/AInputS.h b/Source/PS_Source/Input/AInputS.h index 2a57da4..abd8b69 100644 --- a/Source/PS_Source/Input/AInputS.h +++ b/Source/PS_Source/Input/AInputS.h @@ -41,7 +41,7 @@ class AInputS final : public InputS public: AInputS(AudioFormatManager* mana) : m_manager(mana) { - m_readbuf.setSize(2, 65536*8); + m_readbuf.setSize(2, 65536*2); m_readbuf.clear(); m_crossfadebuf.setSize(2, 44100); m_crossfadebuf.clear(); @@ -350,6 +350,11 @@ public: m_seekfade.counter = 0; m_seekfade.state = 1; } + else + { + m_seekfade.state = 0; + setActiveRangeImpl(rng); + } m_seekfade.length = 2048; } void setLoopEnabled(bool b) override diff --git a/Source/PS_Source/StretchSource.cpp b/Source/PS_Source/StretchSource.cpp index cc2b17c..3a0825e 100644 --- a/Source/PS_Source/StretchSource.cpp +++ b/Source/PS_Source/StretchSource.cpp @@ -727,7 +727,7 @@ void StretchAudioSource::setOnsetDetection(double x) void StretchAudioSource::setPlayRange(Range playrange) { - if ((m_playrange.isEmpty() == false && playrange == m_playrange) || playrange==m_inputfile->getActiveRange()) + if (playrange == m_playrange || playrange == m_inputfile->getActiveRange()) return; if (m_cs.tryEnter()) { diff --git a/readme.txt b/readme.txt index 68b0ea1..c789dc5 100644 --- a/readme.txt +++ b/readme.txt @@ -7,12 +7,11 @@ Copyright (C) 2017-2018 Xenakios Released under GNU General Public License v.2 license. History : -05-31-2018 1.2.1 +06-01-2018 1.2.1 -Added looping enabled parameter - -Added GUI button and parameter to rewind to beginning of selected time range + -Added GUI button and parameter to rewind to beginning of selected play range -Flush old stretched audio faster when source audio is changed - -Increase disk read buffer size - -Fix time range not being recalled properly when loading host project + -Fix play range not being recalled properly when loading host project 05-07-2018 1.2.0 -Changed "Octaves" module to "Ratios". The Ratios module has more shifters than the previous Octaves module and allows changing the pitch ratios (and the shifters mix)