consolidate semaphore implementation (part two)
This commit is contained in:
parent
003b632ed1
commit
f5278f60d3
@ -52,7 +52,9 @@ AudioRegionEditor::AudioRegionEditor (Session* s, boost::shared_ptr<AudioRegion>
|
|||||||
: RegionEditor (s, r)
|
: RegionEditor (s, r)
|
||||||
, _audio_region (r)
|
, _audio_region (r)
|
||||||
, gain_adjustment(accurate_coefficient_to_dB(_audio_region->scale_amplitude()), -40.0, +40.0, 0.1, 1.0, 0)
|
, gain_adjustment(accurate_coefficient_to_dB(_audio_region->scale_amplitude()), -40.0, +40.0, 0.1, 1.0, 0)
|
||||||
#ifndef PLATFORM_WINDOWS
|
#ifdef PLATFORM_WINDOWS
|
||||||
|
, m_peak_sem ("peak_semaphore", 0)
|
||||||
|
#else
|
||||||
, _peak_channel (false)
|
, _peak_channel (false)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@ -137,7 +139,7 @@ void
|
|||||||
AudioRegionEditor::signal_peak_thread ()
|
AudioRegionEditor::signal_peak_thread ()
|
||||||
{
|
{
|
||||||
#ifdef PLATFORM_WINDOWS
|
#ifdef PLATFORM_WINDOWS
|
||||||
m_peak_sem.post ();
|
m_peak_sem.signal ();
|
||||||
#else
|
#else
|
||||||
_peak_channel.deliver ('c');
|
_peak_channel.deliver ('c');
|
||||||
#endif
|
#endif
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
#include "pbd/signals.h"
|
#include "pbd/signals.h"
|
||||||
#ifdef PLATFORM_WINDOWS
|
#ifdef PLATFORM_WINDOWS
|
||||||
#include "pbd/glib_semaphore.h"
|
#include "pbd/semutils.h"
|
||||||
#else
|
#else
|
||||||
#include "pbd/crossthread.h"
|
#include "pbd/crossthread.h"
|
||||||
#endif
|
#endif
|
||||||
@ -84,7 +84,7 @@ class AudioRegionEditor : public RegionEditor
|
|||||||
PBD::Signal1<void, double> PeakAmplitudeFound;
|
PBD::Signal1<void, double> PeakAmplitudeFound;
|
||||||
PBD::ScopedConnection _peak_amplitude_connection;
|
PBD::ScopedConnection _peak_amplitude_connection;
|
||||||
#ifdef PLATFORM_WINDOWS
|
#ifdef PLATFORM_WINDOWS
|
||||||
PBD::GlibSemaphore m_peak_sem;
|
PBD::ProcessSemaphore m_peak_sem;
|
||||||
#else
|
#else
|
||||||
CrossThreadChannel _peak_channel;
|
CrossThreadChannel _peak_channel;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user