13
0

Emit signal when resampler-quality changes

This commit is contained in:
Robin Gareus 2023-02-04 03:20:20 +01:00
parent 5316ac38e7
commit 17f2862f96
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 9 additions and 4 deletions

View File

@ -139,6 +139,7 @@ public:
static PBD::Signal0<void> PortDrop;
static PBD::Signal0<void> PortSignalDrop;
static PBD::Signal0<void> ResamplerQualityChanged;
static void set_varispeed_ratio (double s); //< varispeed playback
static bool set_engine_ratio (double session, double engine); //< SR mismatch

View File

@ -41,6 +41,7 @@ using namespace PBD;
PBD::Signal0<void> Port::PortDrop;
PBD::Signal0<void> Port::PortSignalDrop;
PBD::Signal0<void> Port::ResamplerQualityChanged;
bool Port::_connecting_blocked = false;
pframes_t Port::_global_port_buffer_offset = 0;
@ -729,10 +730,13 @@ Port::setup_resampler (uint32_t q)
_resampler_latency = q - 1;
}
if (port_manager && cur_quality != _resampler_quality) {
Glib::Threads::Mutex::Lock lm (port_manager->process_lock ());
port_manager->reinit (true);
return false;
if (cur_quality != _resampler_quality) {
ResamplerQualityChanged (); /* EMIT SIGNAL */
if (port_manager) {
Glib::Threads::Mutex::Lock lm (port_manager->process_lock ());
port_manager->reinit (true);
return false;
}
}
return true;
}