mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
Cancel audio peak analysis when destroying AudioRegionEditor
This speeds up selection changes when the Region Properties are show in the bottom attachment and long regions are selected. The RegionEditor is destroyed when selection changes and has/had to wait for the peak analysis thread to complete.
This commit is contained in:
parent
8b389ee829
commit
b98884a54c
2 changed files with 7 additions and 2 deletions
|
|
@ -146,7 +146,9 @@ AudioRegionEditor::AudioRegionEditor (Session* s, AudioRegionView* arv)
|
|||
AudioRegionEditor::~AudioRegionEditor ()
|
||||
{
|
||||
void* v;
|
||||
_peak_amplitude_connection.disconnect ();
|
||||
_peak_channel.deliver ('t');
|
||||
Progress::cancel ();
|
||||
pthread_join (_peak_amplitude_thread_handle, &v);
|
||||
}
|
||||
|
||||
|
|
@ -235,7 +237,7 @@ AudioRegionEditor::peak_amplitude_thread ()
|
|||
Temporal::TempoMap::fetch ();
|
||||
|
||||
/* compute peak amplitude and signal the fact */
|
||||
PeakAmplitudeFound (accurate_coefficient_to_dB (_audio_region->maximum_amplitude ())); /* EMIT SIGNAL */
|
||||
PeakAmplitudeFound (accurate_coefficient_to_dB (_audio_region->maximum_amplitude (this))); /* EMIT SIGNAL */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue