Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 784383 | Differences between
and this patch

Collapse All | Expand All

(-)Ardour-6.6.0.orig/libs/ardour/ardour/audioengine.h (-7 / +8 lines)
Lines 39-44 Link Here
39
#include "pbd/signals.h"
39
#include "pbd/signals.h"
40
#include "pbd/pthread_utils.h"
40
#include "pbd/pthread_utils.h"
41
#include "pbd/stacktrace.h"
41
#include "pbd/stacktrace.h"
42
#include "pbd/g_atomic_compat.h"
42
43
43
#include "ardour/ardour.h"
44
#include "ardour/ardour.h"
44
#include "ardour/data_type.h"
45
#include "ardour/data_type.h"
Lines 128-134 class LIBARDOUR_API AudioEngine : public Link Here
128
	bool           is_realtime() const;
129
	bool           is_realtime() const;
129
130
130
	// for the user which hold state_lock to check if reset operation is pending
131
	// for the user which hold state_lock to check if reset operation is pending
131
	bool           is_reset_requested() const { return g_atomic_int_get(const_cast<gint*>(&_hw_reset_request_count)); }
132
	bool           is_reset_requested() const { return g_atomic_int_get (&_hw_reset_request_count); }
132
133
133
	int set_device_name (const std::string&);
134
	int set_device_name (const std::string&);
134
	int set_sample_rate (float);
135
	int set_sample_rate (float);
Lines 298-316 class LIBARDOUR_API AudioEngine : public Link Here
298
	std::string               _last_backend_error_string;
299
	std::string               _last_backend_error_string;
299
300
300
	Glib::Threads::Thread*    _hw_reset_event_thread;
301
	Glib::Threads::Thread*    _hw_reset_event_thread;
301
	gint                      _hw_reset_request_count;
302
	GATOMIC_QUAL gint         _hw_reset_request_count;
302
	Glib::Threads::Cond       _hw_reset_condition;
303
	Glib::Threads::Cond       _hw_reset_condition;
303
	Glib::Threads::Mutex      _reset_request_lock;
304
	Glib::Threads::Mutex      _reset_request_lock;
304
	gint                      _stop_hw_reset_processing;
305
	GATOMIC_QUAL gint         _stop_hw_reset_processing;
305
	Glib::Threads::Thread*    _hw_devicelist_update_thread;
306
	Glib::Threads::Thread*    _hw_devicelist_update_thread;
306
	gint                      _hw_devicelist_update_count;
307
	GATOMIC_QUAL gint         _hw_devicelist_update_count;
307
	Glib::Threads::Cond       _hw_devicelist_update_condition;
308
	Glib::Threads::Cond       _hw_devicelist_update_condition;
308
	Glib::Threads::Mutex      _devicelist_update_lock;
309
	Glib::Threads::Mutex      _devicelist_update_lock;
309
	gint                      _stop_hw_devicelist_processing;
310
	GATOMIC_QUAL gint         _stop_hw_devicelist_processing;
310
	uint32_t                  _start_cnt;
311
	uint32_t                  _start_cnt;
311
	uint32_t                  _init_countdown;
312
	uint32_t                  _init_countdown;
312
	volatile gint             _pending_playback_latency_callback;
313
	GATOMIC_QUAL gint         _pending_playback_latency_callback;
313
	volatile gint             _pending_capture_latency_callback;
314
	GATOMIC_QUAL gint         _pending_capture_latency_callback;
314
315
315
	void start_hw_event_processing();
316
	void start_hw_event_processing();
316
	void stop_hw_event_processing();
317
	void stop_hw_event_processing();
(-)Ardour-6.6.0.orig/libs/ardour/ardour/audio_unit.h (-1 / +2 lines)
Lines 31-36 Link Here
31
#include <vector>
31
#include <vector>
32
#include <map>
32
#include <map>
33
33
34
#include "pbd/g_atomic_compat.h"
34
#include "ardour/plugin.h"
35
#include "ardour/plugin.h"
35
36
36
#include <AudioUnit/AudioUnit.h>
37
#include <AudioUnit/AudioUnit.h>
Lines 172-178 class LIBARDOUR_API AUPlugin : public AR Link Here
172
	int32_t output_channels;
173
	int32_t output_channels;
173
	std::vector<std::pair<int,int> > io_configs;
174
	std::vector<std::pair<int,int> > io_configs;
174
	samplecnt_t _last_nframes;
175
	samplecnt_t _last_nframes;
175
	mutable volatile guint _current_latency;
176
	mutable GATOMIC_QUAL guint _current_latency;
176
	bool _requires_fixed_size_buffers;
177
	bool _requires_fixed_size_buffers;
177
	AudioBufferList* buffers;
178
	AudioBufferList* buffers;
178
	bool _has_midi_input;
179
	bool _has_midi_input;
(-)Ardour-6.6.0.orig/libs/ardour/ardour/auditioner.h (-1 / +1 lines)
Lines 100-106 private: Link Here
100
	boost::shared_ptr<AudioRegion> the_region;
100
	boost::shared_ptr<AudioRegion> the_region;
101
	boost::shared_ptr<MidiRegion> midi_region;
101
	boost::shared_ptr<MidiRegion> midi_region;
102
	samplepos_t current_sample;
102
	samplepos_t current_sample;
103
	mutable gint _auditioning;
103
	mutable GATOMIC_QUAL gint _auditioning;
104
	Glib::Threads::Mutex lock;
104
	Glib::Threads::Mutex lock;
105
	samplecnt_t length;
105
	samplecnt_t length;
106
	sampleoffset_t _seek_sample;
106
	sampleoffset_t _seek_sample;
(-)Ardour-6.6.0.orig/libs/ardour/ardour/automation_list.h (-5 / +7 lines)
Lines 37-42 Link Here
37
#include "pbd/xml++.h"
37
#include "pbd/xml++.h"
38
#include "pbd/statefuldestructible.h"
38
#include "pbd/statefuldestructible.h"
39
#include "pbd/properties.h"
39
#include "pbd/properties.h"
40
#include "pbd/g_atomic_compat.h"
40
41
41
#include "ardour/ardour.h"
42
#include "ardour/ardour.h"
42
43
Lines 107-115 public: Link Here
107
108
108
	void start_touch (double when);
109
	void start_touch (double when);
109
	void stop_touch (double when);
110
	void stop_touch (double when);
110
	bool touching() const { return g_atomic_int_get (const_cast<gint*>(&_touching)); }
111
111
	bool writing() const { return _state == Write; }
112
	bool touching () const { return g_atomic_int_get (&_touching) != 0; }
112
	bool touch_enabled() const { return _state & (Touch | Latch); }
113
	bool writing () const { return _state == Write; }
114
	bool touch_enabled () const { return _state & (Touch | Latch); }
113
115
114
	XMLNode& get_state ();
116
	XMLNode& get_state ();
115
	int set_state (const XMLNode &, int version);
117
	int set_state (const XMLNode &, int version);
Lines 133-140 private: Link Here
133
135
134
	void maybe_signal_changed ();
136
	void maybe_signal_changed ();
135
137
136
	AutoState    _state;
138
	AutoState         _state;
137
	gint         _touching;
139
	GATOMIC_QUAL gint _touching;
138
140
139
	PBD::ScopedConnection _writepass_connection;
141
	PBD::ScopedConnection _writepass_connection;
140
142
(-)Ardour-6.6.0.orig/libs/ardour/ardour/butler.h (-11 / +14 lines)
Lines 30-41 Link Here
30
#include "pbd/crossthread.h"
30
#include "pbd/crossthread.h"
31
#include "pbd/ringbuffer.h"
31
#include "pbd/ringbuffer.h"
32
#include "pbd/pool.h"
32
#include "pbd/pool.h"
33
#include "pbd/g_atomic_compat.h"
34
33
#include "ardour/libardour_visibility.h"
35
#include "ardour/libardour_visibility.h"
34
#include "ardour/types.h"
36
#include "ardour/types.h"
35
#include "ardour/session_handle.h"
37
#include "ardour/session_handle.h"
36
38
37
38
39
namespace ARDOUR {
39
namespace ARDOUR {
40
40
41
/**
41
/**
Lines 79-93 class LIBARDOUR_API Butler : public Sess Link Here
79
		};
79
		};
80
	};
80
	};
81
81
82
	pthread_t    thread;
82
	pthread_t thread;
83
	bool         have_thread;
83
	bool      have_thread;
84
	Glib::Threads::Mutex  request_lock;
84
85
        Glib::Threads::Cond   paused;
85
	Glib::Threads::Mutex      request_lock;
86
	bool         should_run;
86
	Glib::Threads::Cond       paused;
87
	mutable gint should_do_transport_work;
87
	bool                      should_run;
88
	samplecnt_t  _audio_capture_buffer_size;
88
	mutable GATOMIC_QUAL gint should_do_transport_work;
89
	samplecnt_t  _audio_playback_buffer_size;
89
90
	uint32_t     _midi_buffer_size;
90
	samplecnt_t _audio_capture_buffer_size;
91
	samplecnt_t _audio_playback_buffer_size;
92
	uint32_t    _midi_buffer_size;
93
91
	PBD::RingBuffer<CrossThreadPool*> pool_trash;
94
	PBD::RingBuffer<CrossThreadPool*> pool_trash;
92
95
93
private:
96
private:
(-)Ardour-6.6.0.orig/libs/ardour/ardour/circular_buffer.h (-2 / +4 lines)
Lines 20-25 Link Here
20
#define _ardour_circular_buffer_h_
20
#define _ardour_circular_buffer_h_
21
21
22
#include "pbd/ringbuffer.h"
22
#include "pbd/ringbuffer.h"
23
#include "pbd/g_atomic_compat.h"
23
24
24
#include "ardour/libardour_visibility.h"
25
#include "ardour/libardour_visibility.h"
25
#include "ardour/types.h"
26
#include "ardour/types.h"
Lines 69-76 private: Link Here
69
	Event* _buf;
70
	Event* _buf;
70
	guint  _size;
71
	guint  _size;
71
	guint  _size_mask;
72
	guint  _size_mask;
72
	gint   _idx;
73
73
	gint   _ack;
74
	GATOMIC_QUAL gint _idx;
75
	GATOMIC_QUAL gint _ack;
74
};
76
};
75
77
76
}
78
}
(-)Ardour-6.6.0.orig/libs/ardour/ardour/disk_reader.h (-2 / +6 lines)
Lines 22-27 Link Here
22
22
23
#include <boost/optional.hpp>
23
#include <boost/optional.hpp>
24
24
25
#include "pbd/g_atomic_compat.h"
26
25
#include "evoral/Curve.h"
27
#include "evoral/Curve.h"
26
28
27
#include "ardour/disk_io.h"
29
#include "ardour/disk_io.h"
Lines 196-206 private: Link Here
196
	samplepos_t    overwrite_sample;
198
	samplepos_t    overwrite_sample;
197
	sampleoffset_t overwrite_offset;
199
	sampleoffset_t overwrite_offset;
198
	samplepos_t    new_file_sample;
200
	samplepos_t    new_file_sample;
199
	mutable gint   _pending_overwrite;
200
	bool           run_must_resolve;
201
	bool           run_must_resolve;
201
	IOChange       input_change_pending;
202
	IOChange       input_change_pending;
202
	samplepos_t    file_sample[DataType::num_types];
203
	samplepos_t    file_sample[DataType::num_types];
203
204
205
	mutable GATOMIC_QUAL gint _pending_overwrite;
206
204
	DeclickAmp            _declick_amp;
207
	DeclickAmp            _declick_amp;
205
	sampleoffset_t        _declick_offs;
208
	sampleoffset_t        _declick_offs;
206
	bool                  _declick_enabled;
209
	bool                  _declick_enabled;
Lines 209-215 private: Link Here
209
	boost::optional<bool> _last_read_loop;
212
	boost::optional<bool> _last_read_loop;
210
213
211
	static samplecnt_t _chunk_samples;
214
	static samplecnt_t _chunk_samples;
212
	static gint        _no_disk_output;
215
216
	static GATOMIC_QUAL gint _no_disk_output;
213
217
214
	static Declicker   loop_declick_in;
218
	static Declicker   loop_declick_in;
215
	static Declicker   loop_declick_out;
219
	static Declicker   loop_declick_out;
(-)Ardour-6.6.0.orig/libs/ardour/ardour/disk_writer.h (-6 / +9 lines)
Lines 23-28 Link Here
23
#include <list>
23
#include <list>
24
#include <vector>
24
#include <vector>
25
25
26
#include "pbd/g_atomic_compat.h"
27
26
#include "ardour/disk_io.h"
28
#include "ardour/disk_io.h"
27
#include "ardour/midi_buffer.h"
29
#include "ardour/midi_buffer.h"
28
30
Lines 89-96 public: Link Here
89
91
90
	std::list<boost::shared_ptr<Source> >& last_capture_sources () { return _last_capture_sources; }
92
	std::list<boost::shared_ptr<Source> >& last_capture_sources () { return _last_capture_sources; }
91
93
92
	bool record_enabled () const { return g_atomic_int_get (const_cast<gint*> (&_record_enabled)); }
94
	bool record_enabled () const { return g_atomic_int_get (&_record_enabled); }
93
	bool record_safe () const { return g_atomic_int_get (const_cast<gint*> (&_record_safe)); }
95
	bool record_safe () const { return g_atomic_int_get (&_record_safe); }
94
96
95
	void set_record_enabled (bool yn);
97
	void set_record_enabled (bool yn);
96
	void set_record_safe (bool yn);
98
	void set_record_safe (bool yn);
Lines 173-180 private: Link Here
173
	CaptureInfos                 capture_info;
175
	CaptureInfos                 capture_info;
174
	mutable Glib::Threads::Mutex capture_info_lock;
176
	mutable Glib::Threads::Mutex capture_info_lock;
175
177
176
	gint          _record_enabled;
177
	gint          _record_safe;
178
	samplepos_t   _capture_start_sample;
178
	samplepos_t   _capture_start_sample;
179
	samplecnt_t   _capture_captured;
179
	samplecnt_t   _capture_captured;
180
	bool          _was_recording;
180
	bool          _was_recording;
Lines 186-198 private: Link Here
186
	AlignStyle    _alignment_style;
186
	AlignStyle    _alignment_style;
187
	std::string   _write_source_name;
187
	std::string   _write_source_name;
188
	NoteMode      _note_mode;
188
	NoteMode      _note_mode;
189
	volatile gint _samples_pending_write;
190
	volatile gint _num_captured_loops;
191
	samplepos_t   _accumulated_capture_offset;
189
	samplepos_t   _accumulated_capture_offset;
192
190
193
	bool          _transport_looped;
191
	bool          _transport_looped;
194
	samplepos_t   _transport_loop_sample;
192
	samplepos_t   _transport_loop_sample;
195
193
194
	GATOMIC_QUAL gint _record_enabled;
195
	GATOMIC_QUAL gint _record_safe;
196
	GATOMIC_QUAL gint _samples_pending_write;
197
	GATOMIC_QUAL gint _num_captured_loops;
198
196
	boost::shared_ptr<SMFSource> _midi_write_source;
199
	boost::shared_ptr<SMFSource> _midi_write_source;
197
200
198
	std::list<boost::shared_ptr<Source> >            _last_capture_sources;
201
	std::list<boost::shared_ptr<Source> >            _last_capture_sources;
(-)Ardour-6.6.0.orig/libs/ardour/ardour/graph.h (-8 / +9 lines)
Lines 32-37 Link Here
32
32
33
#include "pbd/mpmc_queue.h"
33
#include "pbd/mpmc_queue.h"
34
#include "pbd/semutils.h"
34
#include "pbd/semutils.h"
35
#include "pbd/g_atomic_compat.h"
35
36
36
#include "ardour/audio_backend.h"
37
#include "ardour/audio_backend.h"
37
#include "ardour/libardour_visibility.h"
38
#include "ardour/libardour_visibility.h"
Lines 91-128 private: Link Here
91
	node_list_t _init_trigger_list[2];
92
	node_list_t _init_trigger_list[2];
92
93
93
	PBD::MPMCQueue<GraphNode*> _trigger_queue;      ///< nodes that can be processed
94
	PBD::MPMCQueue<GraphNode*> _trigger_queue;      ///< nodes that can be processed
94
	volatile guint             _trigger_queue_size; ///< number of entries in trigger-queue
95
	GATOMIC_QUAL guint         _trigger_queue_size; ///< number of entries in trigger-queue
95
96
96
	/** Start worker threads */
97
	/** Start worker threads */
97
	PBD::Semaphore _execution_sem;
98
	PBD::Semaphore _execution_sem;
98
99
99
	/** The number of processing threads that are asleep */
100
	/** The number of processing threads that are asleep */
100
	volatile guint _idle_thread_cnt;
101
	GATOMIC_QUAL guint _idle_thread_cnt;
101
102
102
	/** Signalled to start a run of the graph for a process callback */
103
	/** Signalled to start a run of the graph for a process callback */
103
	PBD::Semaphore _callback_start_sem;
104
	PBD::Semaphore _callback_start_sem;
104
	PBD::Semaphore _callback_done_sem;
105
	PBD::Semaphore _callback_done_sem;
105
106
106
	/** The number of unprocessed nodes that do not feed any other node; updated during processing */
107
	/** The number of unprocessed nodes that do not feed any other node; updated during processing */
107
	volatile guint _terminal_refcnt;
108
	GATOMIC_QUAL guint _terminal_refcnt;
108
109
109
	/** The initial number of nodes that do not feed any other node (for each chain) */
110
	/** The initial number of nodes that do not feed any other node (for each chain) */
110
	guint _n_terminal_nodes[2];
111
	guint _n_terminal_nodes[2];
111
	bool  _graph_empty;
112
	bool  _graph_empty;
112
113
113
	/* number of background worker threads >= 0 */
114
	/* number of background worker threads >= 0 */
114
	volatile guint _n_workers;
115
	GATOMIC_QUAL guint _n_workers;
115
116
116
	/* flag to terminate background threads */
117
	/* flag to terminate background threads */
117
	volatile gint _terminate;
118
	GATOMIC_QUAL gint _terminate;
118
119
119
	/* chain swapping */
120
	/* chain swapping */
120
	Glib::Threads::Cond  _cleanup_cond;
121
	Glib::Threads::Cond  _cleanup_cond;
121
	mutable Glib::Threads::Mutex _swap_mutex;
122
	mutable Glib::Threads::Mutex _swap_mutex;
122
123
123
	volatile int _current_chain;
124
	GATOMIC_QUAL gint _current_chain;
124
	volatile int _pending_chain;
125
	GATOMIC_QUAL gint _pending_chain;
125
	volatile int _setup_chain;
126
	GATOMIC_QUAL gint _setup_chain;
126
127
127
	/* parameter caches */
128
	/* parameter caches */
128
	pframes_t   _process_nframes;
129
	pframes_t   _process_nframes;
(-)Ardour-6.6.0.orig/libs/ardour/ardour/graphnode.h (-2 / +3 lines)
Lines 27-32 Link Here
27
27
28
#include <boost/shared_ptr.hpp>
28
#include <boost/shared_ptr.hpp>
29
29
30
#include "pbd/g_atomic_compat.h"
31
30
namespace ARDOUR
32
namespace ARDOUR
31
{
33
{
32
class Graph;
34
class Graph;
Lines 68-75 private: Link Here
68
	void process ();
70
	void process ();
69
71
70
	boost::shared_ptr<Graph> _graph;
72
	boost::shared_ptr<Graph> _graph;
71
73
	GATOMIC_QUAL gint        _refcount;
72
	gint _refcount;
73
};
74
};
74
}
75
}
75
76
(-)Ardour-6.6.0.orig/libs/ardour/ardour/meter.h (-2 / +3 lines)
Lines 25-30 Link Here
25
#include <vector>
25
#include <vector>
26
26
27
#include "pbd/fastlog.h"
27
#include "pbd/fastlog.h"
28
#include "pbd/g_atomic_compat.h"
28
29
29
#include "ardour/libardour_visibility.h"
30
#include "ardour/libardour_visibility.h"
30
#include "ardour/processor.h"
31
#include "ardour/processor.h"
Lines 99-106 private: Link Here
99
	 */
100
	 */
100
	ChanCount current_meters;
101
	ChanCount current_meters;
101
102
102
	volatile gint _reset_dpm;
103
	GATOMIC_QUAL gint _reset_dpm;
103
	volatile gint _reset_max;
104
	GATOMIC_QUAL gint _reset_max;
104
105
105
	uint32_t           _bufcnt;
106
	uint32_t           _bufcnt;
106
	std::vector<float> _peak_buffer;     // internal, integrate
107
	std::vector<float> _peak_buffer;     // internal, integrate
(-)Ardour-6.6.0.orig/libs/ardour/ardour/midi_channel_filter.h (-5 / +7 lines)
Lines 23-30 Link Here
23
23
24
#include <glib.h>
24
#include <glib.h>
25
25
26
#include "ardour/types.h"
27
#include "pbd/signals.h"
26
#include "pbd/signals.h"
27
#include "pbd/g_atomic_compat.h"
28
29
#include "ardour/types.h"
28
30
29
namespace ARDOUR
31
namespace ARDOUR
30
{
32
{
Lines 71-94 public: Link Here
71
73
72
	/** Atomically get both the channel mode and mask. */
74
	/** Atomically get both the channel mode and mask. */
73
	void get_mode_and_mask(ChannelMode* mode, uint16_t* mask) const {
75
	void get_mode_and_mask(ChannelMode* mode, uint16_t* mask) const {
74
		const uint32_t mm = g_atomic_int_get(&_mode_mask);
76
		const uint32_t mm = g_atomic_int_get (&_mode_mask);
75
		*mode = static_cast<ChannelMode>((mm & 0xFFFF0000) >> 16);
77
		*mode = static_cast<ChannelMode>((mm & 0xFFFF0000) >> 16);
76
		*mask = (mm & 0x0000FFFF);
78
		*mask = (mm & 0x0000FFFF);
77
	}
79
	}
78
80
79
	ChannelMode get_channel_mode() const {
81
	ChannelMode get_channel_mode() const {
80
		return static_cast<ChannelMode>((g_atomic_int_get(&_mode_mask) & 0xFFFF0000) >> 16);
82
		return static_cast<ChannelMode>((g_atomic_int_get (&_mode_mask) & 0xFFFF0000) >> 16);
81
	}
83
	}
82
84
83
	uint16_t get_channel_mask() const {
85
	uint16_t get_channel_mask() const {
84
		return g_atomic_int_get(&_mode_mask) & 0x0000FFFF;
86
		return g_atomic_int_get (&_mode_mask) & 0x0000FFFF;
85
	}
87
	}
86
88
87
	PBD::Signal0<void> ChannelMaskChanged;
89
	PBD::Signal0<void> ChannelMaskChanged;
88
	PBD::Signal0<void> ChannelModeChanged;
90
	PBD::Signal0<void> ChannelModeChanged;
89
91
90
private:
92
private:
91
	uint32_t _mode_mask;  ///< 16 bits mode, 16 bits mask
93
	GATOMIC_QUAL uint32_t _mode_mask;  ///< 16 bits mode, 16 bits mask
92
};
94
};
93
95
94
} /* namespace ARDOUR */
96
} /* namespace ARDOUR */
(-)Ardour-6.6.0.orig/libs/ardour/ardour/pannable.h (-2 / +3 lines)
Lines 66-72 public: Link Here
66
66
67
	void start_touch (double when);
67
	void start_touch (double when);
68
	void stop_touch (double when);
68
	void stop_touch (double when);
69
	bool touching() const { return g_atomic_int_get (const_cast<gint*>(&_touching)); }
69
	bool touching() const { return g_atomic_int_get (&_touching); }
70
	bool writing() const { return _auto_state == Write; }
70
	bool writing() const { return _auto_state == Write; }
71
	bool touch_enabled() const { return _auto_state & (Touch | Latch); }
71
	bool touch_enabled() const { return _auto_state & (Touch | Latch); }
72
72
Lines 80-89 protected: Link Here
80
80
81
	boost::weak_ptr<Panner> _panner;
81
	boost::weak_ptr<Panner> _panner;
82
	AutoState _auto_state;
82
	AutoState _auto_state;
83
	gint      _touching;
84
	bool      _has_state;
83
	bool      _has_state;
85
	uint32_t  _responding_to_control_auto_state_change;
84
	uint32_t  _responding_to_control_auto_state_change;
86
85
86
	GATOMIC_QUAL gint _touching;
87
87
	void control_auto_state_changed (AutoState);
88
	void control_auto_state_changed (AutoState);
88
89
89
private:
90
private:
(-)Ardour-6.6.0.orig/libs/ardour/ardour/playlist.h (-2 / +3 lines)
Lines 45-50 Link Here
45
#include "pbd/stateful.h"
45
#include "pbd/stateful.h"
46
#include "pbd/statefuldestructible.h"
46
#include "pbd/statefuldestructible.h"
47
#include "pbd/undo.h"
47
#include "pbd/undo.h"
48
#include "pbd/g_atomic_compat.h"
48
49
49
#include "evoral/Range.h"
50
#include "evoral/Range.h"
50
51
Lines 343-350 protected: Link Here
343
	PBD::ScopedConnectionList            region_drop_references_connections;
344
	PBD::ScopedConnectionList            region_drop_references_connections;
344
	DataType                             _type;
345
	DataType                             _type;
345
	uint32_t                             _sort_id;
346
	uint32_t                             _sort_id;
346
	mutable gint                         block_notifications;
347
	mutable GATOMIC_QUAL gint            block_notifications;
347
	mutable gint                         ignore_state_changes;
348
	mutable GATOMIC_QUAL gint            ignore_state_changes;
348
	std::set<boost::shared_ptr<Region> > pending_adds;
349
	std::set<boost::shared_ptr<Region> > pending_adds;
349
	std::set<boost::shared_ptr<Region> > pending_removes;
350
	std::set<boost::shared_ptr<Region> > pending_removes;
350
	RegionList                           pending_bounds;
351
	RegionList                           pending_bounds;
(-)Ardour-6.6.0.orig/libs/ardour/ardour/plugin_insert.h (-4 / +4 lines)
Lines 31-36 Link Here
31
31
32
#include "pbd/stack_allocator.h"
32
#include "pbd/stack_allocator.h"
33
#include "pbd/timing.h"
33
#include "pbd/timing.h"
34
#include "pbd/g_atomic_compat.h"
34
35
35
#include "ardour/ardour.h"
36
#include "ardour/ardour.h"
36
#include "ardour/libardour_visibility.h"
37
#include "ardour/libardour_visibility.h"
Lines 441-450 private: Link Here
441
442
442
	void preset_load_set_value (uint32_t, float);
443
	void preset_load_set_value (uint32_t, float);
443
444
444
	PBD::TimingStats _timing_stats;
445
	PBD::TimingStats  _timing_stats;
445
	volatile gint _stat_reset;
446
	GATOMIC_QUAL gint _stat_reset;
446
447
	GATOMIC_QUAL gint _flush;
447
	volatile gint _flush;
448
};
448
};
449
449
450
} // namespace ARDOUR
450
} // namespace ARDOUR
(-)Ardour-6.6.0.orig/libs/ardour/ardour/port_engine_shared.h (-1 / +1 lines)
Lines 184-190 protected: Link Here
184
	std::vector<PortConnectData *> _port_connection_queue;
184
	std::vector<PortConnectData *> _port_connection_queue;
185
	pthread_mutex_t _port_callback_mutex;
185
	pthread_mutex_t _port_callback_mutex;
186
186
187
	gint _port_change_flag; /* atomic */
187
	GATOMIC_QUAL gint _port_change_flag; /* atomic */
188
188
189
	void port_connect_callback (const std::string& a, const std::string& b, bool conn) {
189
	void port_connect_callback (const std::string& a, const std::string& b, bool conn) {
190
		pthread_mutex_lock (&_port_callback_mutex);
190
		pthread_mutex_lock (&_port_callback_mutex);
(-)Ardour-6.6.0.orig/libs/ardour/ardour/port_manager.h (-1 / +2 lines)
Lines 32-37 Link Here
32
#include "pbd/natsort.h"
32
#include "pbd/natsort.h"
33
#include "pbd/rcu.h"
33
#include "pbd/rcu.h"
34
#include "pbd/ringbuffer.h"
34
#include "pbd/ringbuffer.h"
35
#include "pbd/g_atomic_compat.h"
35
36
36
#include "ardour/chan_count.h"
37
#include "ardour/chan_count.h"
37
#include "ardour/midiport_manager.h"
38
#include "ardour/midiport_manager.h"
Lines 362-368 private: Link Here
362
363
363
	SerializedRCUManager<AudioInputPorts> _audio_input_ports;
364
	SerializedRCUManager<AudioInputPorts> _audio_input_ports;
364
	SerializedRCUManager<MIDIInputPorts>  _midi_input_ports;
365
	SerializedRCUManager<MIDIInputPorts>  _midi_input_ports;
365
	volatile gint                         _reset_meters;
366
	GATOMIC_QUAL gint                     _reset_meters;
366
};
367
};
367
368
368
} // namespace ARDOUR
369
} // namespace ARDOUR
(-)Ardour-6.6.0.orig/libs/ardour/ardour/presentation_info.h (-1 / +2 lines)
Lines 29-34 Link Here
29
#include "pbd/signals.h"
29
#include "pbd/signals.h"
30
#include "pbd/stateful.h"
30
#include "pbd/stateful.h"
31
#include "pbd/properties.h"
31
#include "pbd/properties.h"
32
#include "pbd/g_atomic_compat.h"
32
33
33
#include "ardour/libardour_visibility.h"
34
#include "ardour/libardour_visibility.h"
34
35
Lines 274-280 class LIBARDOUR_API PresentationInfo : p Link Here
274
275
275
	static PBD::PropertyChange _pending_static_changes;
276
	static PBD::PropertyChange _pending_static_changes;
276
	static Glib::Threads::Mutex static_signal_lock;
277
	static Glib::Threads::Mutex static_signal_lock;
277
	static int _change_signal_suspended;
278
	static GATOMIC_QUAL gint   _change_signal_suspended;
278
279
279
	static int selection_counter;
280
	static int selection_counter;
280
};
281
};
(-)Ardour-6.6.0.orig/libs/ardour/ardour/route.h (-4 / +5 lines)
Lines 41-46 Link Here
41
#include "pbd/stateful.h"
41
#include "pbd/stateful.h"
42
#include "pbd/controllable.h"
42
#include "pbd/controllable.h"
43
#include "pbd/destructible.h"
43
#include "pbd/destructible.h"
44
#include "pbd/g_atomic_compat.h"
44
45
45
#include "ardour/ardour.h"
46
#include "ardour/ardour.h"
46
#include "ardour/gain_control.h"
47
#include "ardour/gain_control.h"
Lines 646-655 protected: Link Here
646
		EmitRtProcessorChange = 0x04
647
		EmitRtProcessorChange = 0x04
647
	};
648
	};
648
649
649
	ProcessorList  _pending_processor_order;
650
	ProcessorList     _pending_processor_order;
650
	gint           _pending_process_reorder; // atomic
651
	GATOMIC_QUAL gint _pending_process_reorder; // atomic
651
	gint           _pending_listen_change; // atomic
652
	GATOMIC_QUAL gint _pending_listen_change; // atomic
652
	gint           _pending_signals; // atomic
653
	GATOMIC_QUAL gint _pending_signals; // atomic
653
654
654
	MeterPoint     _meter_point;
655
	MeterPoint     _meter_point;
655
	MeterPoint     _pending_meter_point;
656
	MeterPoint     _pending_meter_point;
(-)Ardour-6.6.0.orig/libs/ardour/ardour/rt_tasklist.h (-1 / +2 lines)
Lines 23-28 Link Here
23
#include <boost/function.hpp>
23
#include <boost/function.hpp>
24
24
25
#include "pbd/semutils.h"
25
#include "pbd/semutils.h"
26
#include "pbd/g_atomic_compat.h"
26
27
27
#include "ardour/libardour_visibility.h"
28
#include "ardour/libardour_visibility.h"
28
#include "ardour/types.h"
29
#include "ardour/types.h"
Lines 44-50 public: Link Here
44
	void process (TaskList const&);
45
	void process (TaskList const&);
45
46
46
private:
47
private:
47
	gint _threads_active;
48
	GATOMIC_QUAL gint      _threads_active;
48
	std::vector<pthread_t> _threads;
49
	std::vector<pthread_t> _threads;
49
50
50
	void reset_thread_list ();
51
	void reset_thread_list ();
(-)Ardour-6.6.0.orig/libs/ardour/ardour/selection.h (-1 / +2 lines)
Lines 91-98 class LIBARDOUR_API CoreSelection : publ Link Here
91
91
92
  private:
92
  private:
93
	mutable Glib::Threads::RWLock _lock;
93
	mutable Glib::Threads::RWLock _lock;
94
	GATOMIC_QUAL gint             _selection_order;
95
94
	Session& session;
96
	Session& session;
95
	int selection_order;
96
97
97
	struct SelectedStripable {
98
	struct SelectedStripable {
98
		SelectedStripable (boost::shared_ptr<Stripable>, boost::shared_ptr<AutomationControl>, int);
99
		SelectedStripable (boost::shared_ptr<Stripable>, boost::shared_ptr<AutomationControl>, int);
(-)Ardour-6.6.0.orig/libs/ardour/ardour/session.h (-26 / +28 lines)
Lines 62-67 Link Here
62
#include "pbd/statefuldestructible.h"
62
#include "pbd/statefuldestructible.h"
63
#include "pbd/signals.h"
63
#include "pbd/signals.h"
64
#include "pbd/undo.h"
64
#include "pbd/undo.h"
65
#include "pbd/g_atomic_compat.h"
65
66
66
#include "lua/luastate.h"
67
#include "lua/luastate.h"
67
68
Lines 1334-1340 private: Link Here
1334
	typedef void (Session::*process_function_type)(pframes_t);
1335
	typedef void (Session::*process_function_type)(pframes_t);
1335
1336
1336
	AudioEngine&            _engine;
1337
	AudioEngine&            _engine;
1337
	mutable gint             processing_prohibited;
1338
	process_function_type    process_function;
1338
	process_function_type    process_function;
1339
	process_function_type    last_process_function;
1339
	process_function_type    last_process_function;
1340
	bool                    _bounce_processing_active;
1340
	bool                    _bounce_processing_active;
Lines 1342-1351 private: Link Here
1342
	samplecnt_t             _base_sample_rate;     // sample-rate of the session at creation time, "native" SR
1342
	samplecnt_t             _base_sample_rate;     // sample-rate of the session at creation time, "native" SR
1343
	samplecnt_t             _nominal_sample_rate;  // overridden by audioengine setting
1343
	samplecnt_t             _nominal_sample_rate;  // overridden by audioengine setting
1344
	samplecnt_t             _current_sample_rate;  // this includes video pullup offset
1344
	samplecnt_t             _current_sample_rate;  // this includes video pullup offset
1345
	mutable gint            _record_status;
1346
	samplepos_t             _transport_sample;
1345
	samplepos_t             _transport_sample;
1347
	gint                    _seek_counter;
1346
	GATOMIC_QUAL gint       _seek_counter;
1348
	gint                    _butler_seek_counter;
1347
	GATOMIC_QUAL gint       _butler_seek_counter;
1349
	Location*               _session_range_location; ///< session range, or 0 if there is nothing in the session yet
1348
	Location*               _session_range_location; ///< session range, or 0 if there is nothing in the session yet
1350
	bool                    _session_range_is_free;
1349
	bool                    _session_range_is_free;
1351
	bool                    _silent;
1350
	bool                    _silent;
Lines 1379-1384 private: Link Here
1379
1378
1380
	std::string             _missing_file_replacement;
1379
	std::string             _missing_file_replacement;
1381
1380
1381
	mutable GATOMIC_QUAL gint _processing_prohibited;
1382
	mutable GATOMIC_QUAL gint _record_status;
1383
1382
	void add_monitor_section ();
1384
	void add_monitor_section ();
1383
	void remove_monitor_section ();
1385
	void remove_monitor_section ();
1384
1386
Lines 1401-1409 private: Link Here
1401
1403
1402
	samplecnt_t calc_preroll_subcycle (samplecnt_t) const;
1404
	samplecnt_t calc_preroll_subcycle (samplecnt_t) const;
1403
1405
1404
	void block_processing() { g_atomic_int_set (&processing_prohibited, 1); }
1406
	void block_processing() { g_atomic_int_set (&_processing_prohibited, 1); }
1405
	void unblock_processing() { g_atomic_int_set (&processing_prohibited, 0); }
1407
	void unblock_processing() { g_atomic_int_set (&_processing_prohibited, 0); }
1406
	bool processing_blocked() const { return g_atomic_int_get (&processing_prohibited); }
1408
	bool processing_blocked() const { return g_atomic_int_get (&_processing_prohibited); }
1407
1409
1408
	static const samplecnt_t bounce_chunk_size;
1410
	static const samplecnt_t bounce_chunk_size;
1409
1411
Lines 1506-1514 private: Link Here
1506
	StateOfTheState _state_of_the_state;
1508
	StateOfTheState _state_of_the_state;
1507
1509
1508
	friend class    StateProtector;
1510
	friend class    StateProtector;
1509
	gint            _suspend_save; /* atomic */
1511
	GATOMIC_QUAL gint  _suspend_save;
1510
	volatile bool   _save_queued;
1512
	volatile bool      _save_queued;
1511
	volatile bool   _save_queued_pending;
1513
	volatile bool      _save_queued_pending;
1512
1514
1513
	Glib::Threads::Mutex save_state_lock;
1515
	Glib::Threads::Mutex save_state_lock;
1514
	Glib::Threads::Mutex save_source_lock;
1516
	Glib::Threads::Mutex save_source_lock;
Lines 1547-1554 private: Link Here
1547
1549
1548
	static const PostTransportWork ProcessCannotProceedMask = PostTransportWork (PostTransportAudition);
1550
	static const PostTransportWork ProcessCannotProceedMask = PostTransportWork (PostTransportAudition);
1549
1551
1550
	gint _post_transport_work; /* accessed only atomic ops */
1552
	GATOMIC_QUAL gint _post_transport_work; /* accessed only atomic ops */
1551
	PostTransportWork post_transport_work() const        { return (PostTransportWork) g_atomic_int_get (const_cast<gint*>(&_post_transport_work)); }
1553
	PostTransportWork post_transport_work() const        { return (PostTransportWork) g_atomic_int_get (&_post_transport_work); }
1552
	void set_post_transport_work (PostTransportWork ptw) { g_atomic_int_set (&_post_transport_work, (gint) ptw); }
1554
	void set_post_transport_work (PostTransportWork ptw) { g_atomic_int_set (&_post_transport_work, (gint) ptw); }
1553
	void add_post_transport_work (PostTransportWork ptw);
1555
	void add_post_transport_work (PostTransportWork ptw);
1554
1556
Lines 1665-1673 private: Link Here
1665
	Glib::Threads::Mutex  _update_latency_lock;
1667
	Glib::Threads::Mutex  _update_latency_lock;
1666
1668
1667
	typedef std::queue<AutoConnectRequest> AutoConnectQueue;
1669
	typedef std::queue<AutoConnectRequest> AutoConnectQueue;
1668
	Glib::Threads::Mutex  _auto_connect_queue_lock;
1670
	Glib::Threads::Mutex _auto_connect_queue_lock;
1669
	AutoConnectQueue _auto_connect_queue;
1671
	AutoConnectQueue     _auto_connect_queue;
1670
	guint _latency_recompute_pending;
1672
	GATOMIC_QUAL guint   _latency_recompute_pending;
1671
1673
1672
	void get_physical_ports (std::vector<std::string>& inputs, std::vector<std::string>& outputs, DataType type,
1674
	void get_physical_ports (std::vector<std::string>& inputs, std::vector<std::string>& outputs, DataType type,
1673
	                         MidiPortFlags include = MidiPortFlags (0),
1675
	                         MidiPortFlags include = MidiPortFlags (0),
Lines 1788-1795 private: Link Here
1788
		OnlyLoop,
1790
		OnlyLoop,
1789
	};
1791
	};
1790
1792
1791
	volatile gint _punch_or_loop; // enum PunchLoopLock
1793
	GATOMIC_QUAL gint _punch_or_loop; // enum PunchLoopLock
1792
	gint current_usecs_per_track;
1794
	GATOMIC_QUAL gint _current_usecs_per_track;
1793
1795
1794
	bool punch_active () const;
1796
	bool punch_active () const;
1795
	void unset_punch ();
1797
	void unset_punch ();
Lines 1995-2002 private: Link Here
1995
1997
1996
	std::string get_best_session_directory_for_new_audio ();
1998
	std::string get_best_session_directory_for_new_audio ();
1997
1999
1998
	mutable gint _playback_load;
2000
	mutable GATOMIC_QUAL gint _playback_load;
1999
	mutable gint _capture_load;
2001
	mutable GATOMIC_QUAL gint _capture_load;
2000
2002
2001
	/* I/O bundles */
2003
	/* I/O bundles */
2002
2004
Lines 2118-2125 private: Link Here
2118
	mutable bool have_looped; ///< Used in \ref audible_sample
2120
	mutable bool have_looped; ///< Used in \ref audible_sample
2119
2121
2120
	void update_route_record_state ();
2122
	void update_route_record_state ();
2121
	gint _have_rec_enabled_track;
2123
	GATOMIC_QUAL gint _have_rec_enabled_track;
2122
	gint _have_rec_disabled_track;
2124
	GATOMIC_QUAL gint _have_rec_disabled_track;
2123
2125
2124
	static int ask_about_playlist_deletion (boost::shared_ptr<Playlist>);
2126
	static int ask_about_playlist_deletion (boost::shared_ptr<Playlist>);
2125
2127
Lines 2166-2172 private: Link Here
2166
	uint32_t _step_editors;
2168
	uint32_t _step_editors;
2167
2169
2168
	/** true if timecode transmission by the transport is suspended, otherwise false */
2170
	/** true if timecode transmission by the transport is suspended, otherwise false */
2169
	mutable gint _suspend_timecode_transmission;
2171
	mutable GATOMIC_QUAL gint _suspend_timecode_transmission;
2170
2172
2171
	void update_locations_after_tempo_map_change (const Locations::LocationList &);
2173
	void update_locations_after_tempo_map_change (const Locations::LocationList &);
2172
2174
Lines 2186-2194 private: Link Here
2186
2188
2187
	void ensure_route_presentation_info_gap (PresentationInfo::order_t, uint32_t gap_size);
2189
	void ensure_route_presentation_info_gap (PresentationInfo::order_t, uint32_t gap_size);
2188
2190
2189
	friend class    ProcessorChangeBlocker;
2191
	friend class ProcessorChangeBlocker;
2190
	gint            _ignore_route_processor_changes; /* atomic */
2192
	GATOMIC_QUAL gint _ignore_route_processor_changes;
2191
	gint            _ignored_a_processor_change;
2193
	GATOMIC_QUAL gint _ignored_a_processor_change;
2192
2194
2193
	MidiClockTicker* midi_clock;
2195
	MidiClockTicker* midi_clock;
2194
2196
Lines 2236-2242 private: Link Here
2236
2238
2237
	std::string unnamed_file_name () const;
2239
	std::string unnamed_file_name () const;
2238
2240
2239
	gint _update_pretty_names;
2241
	GATOMIC_QUAL gint _update_pretty_names;
2240
};
2242
};
2241
2243
2242
2244
(-)Ardour-6.6.0.orig/libs/ardour/ardour/source.h (-15 / +18 lines)
Lines 31-37 Link Here
31
#include <boost/shared_ptr.hpp>
31
#include <boost/shared_ptr.hpp>
32
#include <boost/enable_shared_from_this.hpp>
32
#include <boost/enable_shared_from_this.hpp>
33
#include <boost/utility.hpp>
33
#include <boost/utility.hpp>
34
34
#include "pbd/statefuldestructible.h"
35
#include "pbd/statefuldestructible.h"
36
#include "pbd/g_atomic_compat.h"
35
37
36
#include "ardour/ardour.h"
38
#include "ardour/ardour.h"
37
#include "ardour/session_object.h"
39
#include "ardour/session_object.h"
Lines 121-127 public: Link Here
121
123
122
	virtual void inc_use_count ();
124
	virtual void inc_use_count ();
123
	virtual void dec_use_count ();
125
	virtual void dec_use_count ();
124
	int  use_count() const { return g_atomic_int_get (const_cast<gint*>(&_use_count)); }
126
	int  use_count() const { return g_atomic_int_get (&_use_count); }
125
	bool used() const { return use_count() > 0; }
127
	bool used() const { return use_count() > 0; }
126
128
127
	uint32_t level() const { return _level; }
129
	uint32_t level() const { return _level; }
Lines 135-154 public: Link Here
135
	static PBD::Signal1<void,boost::shared_ptr<ARDOUR::Source> > SourcePropertyChanged;
137
	static PBD::Signal1<void,boost::shared_ptr<ARDOUR::Source> > SourcePropertyChanged;
136
138
137
  protected:
139
  protected:
138
	DataType            _type;
140
	DataType          _type;
139
	Flag                _flags;
141
	Flag              _flags;
140
	time_t              _timestamp;
142
	time_t            _timestamp;
141
	std::string         _take_id;
143
	std::string       _take_id;
142
	samplepos_t          _natural_position;
144
	samplepos_t       _natural_position;
143
	samplepos_t          _have_natural_position;
145
	samplepos_t       _have_natural_position;
144
	bool                _analysed;
146
	bool              _analysed;
145
        mutable Glib::Threads::Mutex _lock;
147
	GATOMIC_QUAL gint _use_count; /* atomic */
146
        mutable Glib::Threads::Mutex _analysis_lock;
148
	uint32_t          _level; /* how deeply nested is this source w.r.t a disk file */
147
	gint                _use_count; /* atomic */
149
	std::string       _ancestor_name;
148
	uint32_t            _level; /* how deeply nested is this source w.r.t a disk file */
150
	std::string       _captured_for;
149
	std::string         _ancestor_name;
151
	XrunPositions     _xruns;
150
	std::string        _captured_for;
152
151
	XrunPositions      _xruns;
153
	mutable Glib::Threads::Mutex _lock;
154
	mutable Glib::Threads::Mutex _analysis_lock;
152
155
153
  private:
156
  private:
154
	void fix_writable_flags ();
157
	void fix_writable_flags ();
(-)Ardour-6.6.0.orig/libs/ardour/ardour/vst3_host.h (-1 / +2 lines)
Lines 28-33 Link Here
28
28
29
#include <boost/shared_ptr.hpp>
29
#include <boost/shared_ptr.hpp>
30
30
31
#include "pbd/g_atomic_compat.h"
31
#include "ardour/libardour_visibility.h"
32
#include "ardour/libardour_visibility.h"
32
#include "vst3/vst3.h"
33
#include "vst3/vst3.h"
33
34
Lines 151-157 public: Link Here
151
	uint32 PLUGIN_API release () SMTG_OVERRIDE;
152
	uint32 PLUGIN_API release () SMTG_OVERRIDE;
152
153
153
private:
154
private:
154
	gint _cnt; // atomic
155
	GATOMIC_QUAL gint _cnt; // atomic
155
};
156
};
156
157
157
class LIBARDOUR_API HostAttributeList : public Vst::IAttributeList, public RefObject
158
class LIBARDOUR_API HostAttributeList : public Vst::IAttributeList, public RefObject
(-)Ardour-6.6.0.orig/libs/ardour/audioengine.cc (-16 / +17 lines)
Lines 73-79 using namespace PBD; Link Here
73
73
74
AudioEngine* AudioEngine::_instance = 0;
74
AudioEngine* AudioEngine::_instance = 0;
75
75
76
static gint audioengine_thread_cnt = 1;
76
static GATOMIC_QUAL gint audioengine_thread_cnt = 1;
77
77
78
#ifdef SILENCE_AFTER
78
#ifdef SILENCE_AFTER
79
#define SILENCE_AFTER_SECONDS 600
79
#define SILENCE_AFTER_SECONDS 600
Lines 99-113 AudioEngine::AudioEngine () Link Here
99
	, _in_destructor (false)
99
	, _in_destructor (false)
100
	, _last_backend_error_string(AudioBackend::get_error_string(AudioBackend::NoError))
100
	, _last_backend_error_string(AudioBackend::get_error_string(AudioBackend::NoError))
101
	, _hw_reset_event_thread(0)
101
	, _hw_reset_event_thread(0)
102
	, _hw_reset_request_count(0)
103
	, _stop_hw_reset_processing(0)
104
	, _hw_devicelist_update_thread(0)
102
	, _hw_devicelist_update_thread(0)
105
	, _hw_devicelist_update_count(0)
106
	, _stop_hw_devicelist_processing(0)
107
	, _start_cnt (0)
103
	, _start_cnt (0)
108
	, _init_countdown (0)
104
	, _init_countdown (0)
109
	, _pending_playback_latency_callback (0)
110
	, _pending_capture_latency_callback (0)
111
#ifdef SILENCE_AFTER_SECONDS
105
#ifdef SILENCE_AFTER_SECONDS
112
	, _silence_countdown (0)
106
	, _silence_countdown (0)
113
	, _silence_hit_cnt (0)
107
	, _silence_hit_cnt (0)
Lines 116-121 AudioEngine::AudioEngine () Link Here
116
	reset_silence_countdown ();
110
	reset_silence_countdown ();
117
	start_hw_event_processing();
111
	start_hw_event_processing();
118
	discover_backends ();
112
	discover_backends ();
113
114
	g_atomic_int_set (&_hw_reset_request_count, 0);
115
	g_atomic_int_set (&_pending_playback_latency_callback, 0);
116
	g_atomic_int_set (&_pending_capture_latency_callback, 0);
117
	g_atomic_int_set (&_hw_devicelist_update_count, 0);
118
	g_atomic_int_set (&_stop_hw_reset_processing, 0);
119
	g_atomic_int_set (&_stop_hw_devicelist_processing, 0);
119
}
120
}
120
121
121
AudioEngine::~AudioEngine ()
122
AudioEngine::~AudioEngine ()
Lines 639-645 AudioEngine::do_reset_backend() Link Here
639
640
640
	Glib::Threads::Mutex::Lock guard (_reset_request_lock);
641
	Glib::Threads::Mutex::Lock guard (_reset_request_lock);
641
642
642
	while (!_stop_hw_reset_processing) {
643
	while (!g_atomic_int_get (&_stop_hw_reset_processing)) {
643
644
644
		if (g_atomic_int_get (&_hw_reset_request_count) != 0 && _backend) {
645
		if (g_atomic_int_get (&_hw_reset_request_count) != 0 && _backend) {
645
646
Lines 724-737 void Link Here
724
AudioEngine::start_hw_event_processing()
725
AudioEngine::start_hw_event_processing()
725
{
726
{
726
	if (_hw_reset_event_thread == 0) {
727
	if (_hw_reset_event_thread == 0) {
727
		g_atomic_int_set(&_hw_reset_request_count, 0);
728
		g_atomic_int_set (&_hw_reset_request_count, 0);
728
		g_atomic_int_set(&_stop_hw_reset_processing, 0);
729
		g_atomic_int_set (&_stop_hw_reset_processing, 0);
729
		_hw_reset_event_thread = Glib::Threads::Thread::create (boost::bind (&AudioEngine::do_reset_backend, this));
730
		_hw_reset_event_thread = Glib::Threads::Thread::create (boost::bind (&AudioEngine::do_reset_backend, this));
730
	}
731
	}
731
732
732
	if (_hw_devicelist_update_thread == 0) {
733
	if (_hw_devicelist_update_thread == 0) {
733
		g_atomic_int_set(&_hw_devicelist_update_count, 0);
734
		g_atomic_int_set (&_hw_devicelist_update_count, 0);
734
		g_atomic_int_set(&_stop_hw_devicelist_processing, 0);
735
		g_atomic_int_set (&_stop_hw_devicelist_processing, 0);
735
		_hw_devicelist_update_thread = Glib::Threads::Thread::create (boost::bind (&AudioEngine::do_devicelist_update, this));
736
		_hw_devicelist_update_thread = Glib::Threads::Thread::create (boost::bind (&AudioEngine::do_devicelist_update, this));
736
	}
737
	}
737
}
738
}
Lines 741-756 void Link Here
741
AudioEngine::stop_hw_event_processing()
742
AudioEngine::stop_hw_event_processing()
742
{
743
{
743
	if (_hw_reset_event_thread) {
744
	if (_hw_reset_event_thread) {
744
		g_atomic_int_set(&_stop_hw_reset_processing, 1);
745
		g_atomic_int_set (&_stop_hw_reset_processing, 1);
745
		g_atomic_int_set(&_hw_reset_request_count, 0);
746
		g_atomic_int_set (&_hw_reset_request_count, 0);
746
		_hw_reset_condition.signal ();
747
		_hw_reset_condition.signal ();
747
		_hw_reset_event_thread->join ();
748
		_hw_reset_event_thread->join ();
748
		_hw_reset_event_thread = 0;
749
		_hw_reset_event_thread = 0;
749
	}
750
	}
750
751
751
	if (_hw_devicelist_update_thread) {
752
	if (_hw_devicelist_update_thread) {
752
		g_atomic_int_set(&_stop_hw_devicelist_processing, 1);
753
		g_atomic_int_set (&_stop_hw_devicelist_processing, 1);
753
		g_atomic_int_set(&_hw_devicelist_update_count, 0);
754
		g_atomic_int_set (&_hw_devicelist_update_count, 0);
754
		_hw_devicelist_update_condition.signal ();
755
		_hw_devicelist_update_condition.signal ();
755
		_hw_devicelist_update_thread->join ();
756
		_hw_devicelist_update_thread->join ();
756
		_hw_devicelist_update_thread = 0;
757
		_hw_devicelist_update_thread = 0;
(-)Ardour-6.6.0.orig/libs/ardour/audio_unit.cc (-2 / +2 lines)
Lines 435-441 AUPlugin::AUPlugin (AudioEngine& engine, Link Here
435
	, unit (new CAAudioUnit)
435
	, unit (new CAAudioUnit)
436
	, initialized (false)
436
	, initialized (false)
437
	, _last_nframes (0)
437
	, _last_nframes (0)
438
	, _current_latency (UINT_MAX)
439
	, _requires_fixed_size_buffers (false)
438
	, _requires_fixed_size_buffers (false)
440
	, buffers (0)
439
	, buffers (0)
441
	, variable_inputs (false)
440
	, variable_inputs (false)
Lines 477-483 AUPlugin::AUPlugin (const AUPlugin& othe Link Here
477
	, unit (new CAAudioUnit)
476
	, unit (new CAAudioUnit)
478
	, initialized (false)
477
	, initialized (false)
479
	, _last_nframes (0)
478
	, _last_nframes (0)
480
	, _current_latency (UINT_MAX)
481
	, _requires_fixed_size_buffers (false)
479
	, _requires_fixed_size_buffers (false)
482
	, buffers (0)
480
	, buffers (0)
483
	, variable_inputs (false)
481
	, variable_inputs (false)
Lines 571-576 AUPlugin::discover_factory_presets () Link Here
571
void
569
void
572
AUPlugin::init ()
570
AUPlugin::init ()
573
{
571
{
572
	g_atomic_int_set (&_current_latency, UINT_MAX);
573
574
	OSErr err;
574
	OSErr err;
575
	CFStringRef itemName;
575
	CFStringRef itemName;
576
576
(-)Ardour-6.6.0.orig/libs/ardour/auditioner.cc (-1 / +1 lines)
Lines 51-57 using namespace PBD; Link Here
51
Auditioner::Auditioner (Session& s)
51
Auditioner::Auditioner (Session& s)
52
	: Track (s, "auditioner", PresentationInfo::Auditioner)
52
	: Track (s, "auditioner", PresentationInfo::Auditioner)
53
	, current_sample (0)
53
	, current_sample (0)
54
	, _auditioning (0)
55
	, length (0)
54
	, length (0)
56
	, _seek_sample (-1)
55
	, _seek_sample (-1)
57
	, _seeking (false)
56
	, _seeking (false)
Lines 61-66 Auditioner::Auditioner (Session& s) Link Here
61
	, _queue_panic (false)
60
	, _queue_panic (false)
62
	, _import_position (0)
61
	, _import_position (0)
63
{
62
{
63
	g_atomic_int_set (&_auditioning, 0);
64
}
64
}
65
65
66
int
66
int
(-)Ardour-6.6.0.orig/libs/ardour/butler.cc (-4 / +4 lines)
Lines 56-66 Butler::Butler(Session& s) Link Here
56
	, pool_trash(16)
56
	, pool_trash(16)
57
	, _xthread (true)
57
	, _xthread (true)
58
{
58
{
59
	g_atomic_int_set(&should_do_transport_work, 0);
59
	g_atomic_int_set (&should_do_transport_work, 0);
60
	SessionEvent::pool->set_trash (&pool_trash);
60
	SessionEvent::pool->set_trash (&pool_trash);
61
61
62
        /* catch future changes to parameters */
62
	/* catch future changes to parameters */
63
        Config->ParameterChanged.connect_same_thread (*this, boost::bind (&Butler::config_changed, this, _1));
63
	Config->ParameterChanged.connect_same_thread (*this, boost::bind (&Butler::config_changed, this, _1));
64
}
64
}
65
65
66
Butler::~Butler()
66
Butler::~Butler()
Lines 466-472 Butler::wait_until_finished () Link Here
466
bool
466
bool
467
Butler::transport_work_requested () const
467
Butler::transport_work_requested () const
468
{
468
{
469
	return g_atomic_int_get(&should_do_transport_work);
469
	return g_atomic_int_get (&should_do_transport_work);
470
}
470
}
471
471
472
void
472
void
(-)Ardour-6.6.0.orig/libs/ardour/disk_reader.cc (-6 / +7 lines)
Lines 52-58 PBD::Signal0<void> DiskReader::Underr Link Here
52
Sample*               DiskReader::_sum_buffer     = 0;
52
Sample*               DiskReader::_sum_buffer     = 0;
53
Sample*               DiskReader::_mixdown_buffer = 0;
53
Sample*               DiskReader::_mixdown_buffer = 0;
54
gain_t*               DiskReader::_gain_buffer    = 0;
54
gain_t*               DiskReader::_gain_buffer    = 0;
55
gint                  DiskReader::_no_disk_output (0);
55
GATOMIC_QUAL gint     DiskReader::_no_disk_output (0);
56
DiskReader::Declicker DiskReader::loop_declick_in;
56
DiskReader::Declicker DiskReader::loop_declick_in;
57
DiskReader::Declicker DiskReader::loop_declick_out;
57
DiskReader::Declicker DiskReader::loop_declick_out;
58
samplecnt_t           DiskReader::loop_fade_length (0);
58
samplecnt_t           DiskReader::loop_fade_length (0);
Lines 275-280 DiskReader::run (BufferSet& bufs, sample Link Here
275
	sampleoffset_t                 disk_samples_to_consume;
275
	sampleoffset_t                 disk_samples_to_consume;
276
	MonitorState                   ms = _track.monitoring_state ();
276
	MonitorState                   ms = _track.monitoring_state ();
277
	const bool                     midi_only = (c->empty() || !_playlists[DataType::AUDIO]);
277
	const bool                     midi_only = (c->empty() || !_playlists[DataType::AUDIO]);
278
	bool                           no_disk_output = g_atomic_int_get (&_no_disk_output) != 0;
278
279
279
	if (_active) {
280
	if (_active) {
280
		if (!_pending_active) {
281
		if (!_pending_active) {
Lines 358-367 DiskReader::run (BufferSet& bufs, sample Link Here
358
		_declick_offs = 0;
359
		_declick_offs = 0;
359
	}
360
	}
360
361
361
	if (!result_required || ((ms & MonitoringDisk) == 0) || still_locating || _no_disk_output) {
362
	if (!result_required || ((ms & MonitoringDisk) == 0) || still_locating || no_disk_output) {
362
		/* no need for actual disk data, just advance read pointer */
363
		/* no need for actual disk data, just advance read pointer */
363
364
364
		if (!still_locating || _no_disk_output) {
365
		if (!still_locating || no_disk_output) {
365
			for (ChannelList::iterator chan = c->begin (); chan != c->end (); ++chan) {
366
			for (ChannelList::iterator chan = c->begin (); chan != c->end (); ++chan) {
366
				assert ((*chan)->rbuf);
367
				assert ((*chan)->rbuf);
367
				(*chan)->rbuf->increment_read_ptr (disk_samples_to_consume);
368
				(*chan)->rbuf->increment_read_ptr (disk_samples_to_consume);
Lines 370-376 DiskReader::run (BufferSet& bufs, sample Link Here
370
371
371
		/* if monitoring disk but locating put silence in the buffers */
372
		/* if monitoring disk but locating put silence in the buffers */
372
373
373
		if ((_no_disk_output || still_locating) && (ms == MonitoringDisk)) {
374
		if ((no_disk_output || still_locating) && (ms == MonitoringDisk)) {
374
			bufs.silence (nframes, 0);
375
			bufs.silence (nframes, 0);
375
		}
376
		}
376
377
Lines 473-479 midi: Link Here
473
			run_must_resolve = false;
474
			run_must_resolve = false;
474
		}
475
		}
475
476
476
		if (!_no_disk_output && !declick_in_progress () && (ms & MonitoringDisk) && !still_locating && no_playlist_modification_pending && speed) {
477
		if (!no_disk_output && !declick_in_progress () && (ms & MonitoringDisk) && !still_locating && no_playlist_modification_pending && speed) {
477
			get_midi_playback (dst, start_sample, end_sample, ms, scratch_bufs, speed, disk_samples_to_consume);
478
			get_midi_playback (dst, start_sample, end_sample, ms, scratch_bufs, speed, disk_samples_to_consume);
478
		}
479
		}
479
	}
480
	}
Lines 1468-1474 DiskReader::get_midi_playback (MidiBuffe Link Here
1468
		target = &dst;
1469
		target = &dst;
1469
	}
1470
	}
1470
1471
1471
	if (!_no_disk_output) {
1472
	if (!g_atomic_int_get (&_no_disk_output)) {
1472
		const samplecnt_t nframes = abs (end_sample - start_sample);
1473
		const samplecnt_t nframes = abs (end_sample - start_sample);
1473
1474
1474
		if (ms & MonitoringDisk) {
1475
		if (ms & MonitoringDisk) {
(-)Ardour-6.6.0.orig/libs/ardour/disk_writer.cc (-16 / +17 lines)
Lines 48-55 PBD::Signal0<void> DiskWriter::Overrun; Link Here
48
48
49
DiskWriter::DiskWriter (Session& s, Track& t, string const & str, DiskIOProcessor::Flag f)
49
DiskWriter::DiskWriter (Session& s, Track& t, string const & str, DiskIOProcessor::Flag f)
50
	: DiskIOProcessor (s, t, X_("recorder:") + str, f)
50
	: DiskIOProcessor (s, t, X_("recorder:") + str, f)
51
	, _record_enabled (0)
52
	, _record_safe (0)
53
	, _capture_start_sample (0)
51
	, _capture_start_sample (0)
54
	, _capture_captured (0)
52
	, _capture_captured (0)
55
	, _was_recording (false)
53
	, _was_recording (false)
Lines 59-66 DiskWriter::DiskWriter (Session& s, Trac Link Here
59
	, _last_possibly_recording (0)
57
	, _last_possibly_recording (0)
60
	, _alignment_style (ExistingMaterial)
58
	, _alignment_style (ExistingMaterial)
61
	, _note_mode (Sustained)
59
	, _note_mode (Sustained)
62
	, _samples_pending_write (0)
63
	, _num_captured_loops (0)
64
	, _accumulated_capture_offset (0)
60
	, _accumulated_capture_offset (0)
65
	, _transport_looped (false)
61
	, _transport_looped (false)
66
	, _transport_loop_sample (0)
62
	, _transport_loop_sample (0)
Lines 68-73 DiskWriter::DiskWriter (Session& s, Trac Link Here
68
{
64
{
69
	DiskIOProcessor::init ();
65
	DiskIOProcessor::init ();
70
	_xruns.reserve (128);
66
	_xruns.reserve (128);
67
68
	g_atomic_int_set (&_record_enabled, 0);
69
	g_atomic_int_set (&_record_safe, 0);
70
	g_atomic_int_set (&_samples_pending_write, 0);
71
	g_atomic_int_set (&_num_captured_loops, 0);
71
}
72
}
72
73
73
DiskWriter::~DiskWriter ()
74
DiskWriter::~DiskWriter ()
Lines 323-329 DiskWriter::state () Link Here
323
{
324
{
324
	XMLNode& node (DiskIOProcessor::state ());
325
	XMLNode& node (DiskIOProcessor::state ());
325
	node.set_property (X_("type"), X_("diskwriter"));
326
	node.set_property (X_("type"), X_("diskwriter"));
326
	node.set_property (X_("record-safe"), (_record_safe ? X_("yes" : "no")));
327
	node.set_property (X_("record-safe"), record_safe ());
327
	return node;
328
	return node;
328
}
329
}
329
330
Lines 334-342 DiskWriter::set_state (const XMLNode& no Link Here
334
		return -1;
335
		return -1;
335
	}
336
	}
336
337
337
	if (!node.get_property (X_("record-safe"), _record_safe)) {
338
	int rec_safe = 0;
338
		_record_safe = false;
339
	node.get_property (X_("record-safe"), rec_safe);
339
	}
340
	g_atomic_int_set (&_record_safe, rec_safe);
340
341
341
	reset_write_sources (false, true);
342
	reset_write_sources (false, true);
342
343
Lines 476-483 DiskWriter::run (BufferSet& bufs, sample Link Here
476
				_midi_write_source->mark_write_starting_now (_capture_start_sample, _capture_captured, loop_length);
477
				_midi_write_source->mark_write_starting_now (_capture_start_sample, _capture_captured, loop_length);
477
			}
478
			}
478
479
479
			g_atomic_int_set (const_cast<gint*> (&_samples_pending_write), 0);
480
			g_atomic_int_set (&_samples_pending_write, 0);
480
			g_atomic_int_set (const_cast<gint*> (&_num_captured_loops), 0);
481
			g_atomic_int_set (&_num_captured_loops, 0);
481
482
482
			_was_recording = true;
483
			_was_recording = true;
483
484
Lines 581-587 DiskWriter::run (BufferSet& bufs, sample Link Here
581
				   reconstruct their actual time; future clever MIDI looping should
582
				   reconstruct their actual time; future clever MIDI looping should
582
				   probably be implemented in the source instead of here.
583
				   probably be implemented in the source instead of here.
583
				*/
584
				*/
584
				const samplecnt_t loop_offset = _num_captured_loops * loop_length;
585
				const samplecnt_t loop_offset = g_atomic_int_get (&_num_captured_loops) * loop_length;
585
				const samplepos_t event_time = start_sample + loop_offset - _accumulated_capture_offset + ev.time();
586
				const samplepos_t event_time = start_sample + loop_offset - _accumulated_capture_offset + ev.time();
586
				if (event_time < 0 || event_time < _first_recordable_sample) {
587
				if (event_time < 0 || event_time < _first_recordable_sample) {
587
					/* Event out of range, skip */
588
					/* Event out of range, skip */
Lines 607-613 DiskWriter::run (BufferSet& bufs, sample Link Here
607
				}
608
				}
608
			}
609
			}
609
610
610
			g_atomic_int_add (const_cast<gint*>(&_samples_pending_write), nframes);
611
			g_atomic_int_add (&_samples_pending_write, nframes);
611
612
612
			if (buf.size() != 0) {
613
			if (buf.size() != 0) {
613
				Glib::Threads::Mutex::Lock lm (_gui_feed_buffer_mutex, Glib::Threads::TRY_LOCK);
614
				Glib::Threads::Mutex::Lock lm (_gui_feed_buffer_mutex, Glib::Threads::TRY_LOCK);
Lines 693-699 DiskWriter::finish_capture (boost::share Link Here
693
		samplepos_t loop_end    = 0;
694
		samplepos_t loop_end    = 0;
694
		samplepos_t loop_length = 0;
695
		samplepos_t loop_length = 0;
695
		get_location_times (_loop_location, &loop_start, &loop_end, &loop_length);
696
		get_location_times (_loop_location, &loop_start, &loop_end, &loop_length);
696
		ci->loop_offset = _num_captured_loops * loop_length;
697
		ci->loop_offset = g_atomic_int_get (&_num_captured_loops) * loop_length;
697
	} else {
698
	} else {
698
		ci->loop_offset = 0;
699
		ci->loop_offset = 0;
699
	}
700
	}
Lines 931-937 DiskWriter::do_flush (RunContext ctxt, b Link Here
931
932
932
	if (_midi_write_source && _midi_buf) {
933
	if (_midi_write_source && _midi_buf) {
933
934
934
		const samplecnt_t total = g_atomic_int_get(const_cast<gint*> (&_samples_pending_write));
935
		const samplecnt_t total = g_atomic_int_get(&_samples_pending_write);
935
936
936
		if (total == 0 ||
937
		if (total == 0 ||
937
		    _midi_buf->read_space() == 0 ||
938
		    _midi_buf->read_space() == 0 ||
Lines 967-973 DiskWriter::do_flush (RunContext ctxt, b Link Here
967
				error << string_compose(_("MidiDiskstream %1: cannot write to disk"), id()) << endmsg;
968
				error << string_compose(_("MidiDiskstream %1: cannot write to disk"), id()) << endmsg;
968
				return -1;
969
				return -1;
969
			}
970
			}
970
			g_atomic_int_add(const_cast<gint*> (&_samples_pending_write), -to_write);
971
			g_atomic_int_add(&_samples_pending_write, -to_write);
971
		}
972
		}
972
	}
973
	}
973
974
Lines 1286-1292 DiskWriter::loop (samplepos_t transport_ Link Here
1286
	   the Source and/or entirely after the capture is finished.
1287
	   the Source and/or entirely after the capture is finished.
1287
	*/
1288
	*/
1288
	if (_was_recording) {
1289
	if (_was_recording) {
1289
		g_atomic_int_add(const_cast<gint*> (&_num_captured_loops), 1);
1290
		g_atomic_int_add (&_num_captured_loops, 1);
1290
	}
1291
	}
1291
}
1292
}
1292
1293
(-)Ardour-6.6.0.orig/libs/ardour/graph.cc (-1 / +1 lines)
Lines 420-426 Graph::run_one () Link Here
420
	while (!to_run) {
420
	while (!to_run) {
421
		/* Wait for work, fall asleep */
421
		/* Wait for work, fall asleep */
422
		g_atomic_int_inc (&_idle_thread_cnt);
422
		g_atomic_int_inc (&_idle_thread_cnt);
423
		assert (g_atomic_uint_get (&_idle_thread_cnt) <= _n_workers);
423
		assert (g_atomic_uint_get (&_idle_thread_cnt) <= g_atomic_uint_get (&_n_workers));
424
424
425
		DEBUG_TRACE (DEBUG::ProcessThreads, string_compose ("%1 goes to sleep\n", pthread_name ()));
425
		DEBUG_TRACE (DEBUG::ProcessThreads, string_compose ("%1 goes to sleep\n", pthread_name ()));
426
		_execution_sem.wait ();
426
		_execution_sem.wait ();
(-)Ardour-6.6.0.orig/libs/ardour/graphnode.cc (+1 lines)
Lines 27-32 using namespace ARDOUR; Link Here
27
GraphNode::GraphNode (boost::shared_ptr<Graph> graph)
27
GraphNode::GraphNode (boost::shared_ptr<Graph> graph)
28
	: _graph (graph)
28
	: _graph (graph)
29
{
29
{
30
	g_atomic_int_set (&_refcount, 0);
30
}
31
}
31
32
32
GraphNode::~GraphNode ()
33
GraphNode::~GraphNode ()
(-)Ardour-6.6.0.orig/libs/ardour/meter.cc (-2 / +3 lines)
Lines 51-60 PeakMeter::PeakMeter (Session& s, const Link Here
51
51
52
	_pending_active = true;
52
	_pending_active = true;
53
	_meter_type     = MeterPeak;
53
	_meter_type     = MeterPeak;
54
	_reset_dpm      = 1;
55
	_reset_max      = 1;
56
	_bufcnt         = 0;
54
	_bufcnt         = 0;
57
	_combined_peak  = 0;
55
	_combined_peak  = 0;
56
57
	g_atomic_int_set (&_reset_dpm, 1);
58
	g_atomic_int_set (&_reset_max, 1);
58
}
59
}
59
60
60
PeakMeter::~PeakMeter ()
61
PeakMeter::~PeakMeter ()
(-)Ardour-6.6.0.orig/libs/ardour/midi_channel_filter.cc (-4 / +5 lines)
Lines 24-31 Link Here
24
namespace ARDOUR {
24
namespace ARDOUR {
25
25
26
MidiChannelFilter::MidiChannelFilter()
26
MidiChannelFilter::MidiChannelFilter()
27
	: _mode_mask(0x0000FFFF)
27
{
28
{}
28
	g_atomic_int_set (&_mode_mask, 0x0000FFFF);
29
}
29
30
30
void
31
void
31
MidiChannelFilter::filter(BufferSet& bufs)
32
MidiChannelFilter::filter(BufferSet& bufs)
Lines 114-120 MidiChannelFilter::set_channel_mode(Chan Link Here
114
115
115
	if (old_mode != mode || old_mask != mask) {
116
	if (old_mode != mode || old_mask != mask) {
116
		mask = force_mask(mode, mask);
117
		mask = force_mask(mode, mask);
117
		g_atomic_int_set(&_mode_mask, (uint32_t(mode) << 16) | uint32_t(mask));
118
		g_atomic_int_set (&_mode_mask, (uint32_t(mode) << 16) | uint32_t(mask));
118
		ChannelModeChanged();
119
		ChannelModeChanged();
119
		return true;
120
		return true;
120
	}
121
	}
Lines 131-137 MidiChannelFilter::set_channel_mask(uint Link Here
131
132
132
	if (old_mask != mask) {
133
	if (old_mask != mask) {
133
		mask = force_mask(mode, mask);
134
		mask = force_mask(mode, mask);
134
		g_atomic_int_set(&_mode_mask, (uint32_t(mode) << 16) | uint32_t(mask));
135
		g_atomic_int_set (&_mode_mask, (uint32_t(mode) << 16) | uint32_t(mask));
135
		ChannelMaskChanged();
136
		ChannelMaskChanged();
136
		return true;
137
		return true;
137
	}
138
	}
(-)Ardour-6.6.0.orig/libs/ardour/plugin_insert.cc (-3 / +3 lines)
Lines 90-100 PluginInsert::PluginInsert (Session& s, Link Here
90
	, _latency_changed (false)
90
	, _latency_changed (false)
91
	, _bypass_port (UINT32_MAX)
91
	, _bypass_port (UINT32_MAX)
92
	, _inverted_bypass_enable (false)
92
	, _inverted_bypass_enable (false)
93
	, _stat_reset (0)
94
	, _flush (0)
95
{
93
{
96
	/* the first is the master */
94
	g_atomic_int_set (&_stat_reset, 0);
95
	g_atomic_int_set (&_flush, 0);
97
96
97
	/* the first is the master */
98
	if (plug) {
98
	if (plug) {
99
		add_plugin (plug);
99
		add_plugin (plug);
100
		create_automatable_parameters ();
100
		create_automatable_parameters ();
(-)Ardour-6.6.0.orig/libs/ardour/port_engine_shared.cc (-1 / +1 lines)
Lines 190-199 BackendPort::update_connected_latency (b Link Here
190
190
191
PortEngineSharedImpl::PortEngineSharedImpl (PortManager& mgr, std::string const & str)
191
PortEngineSharedImpl::PortEngineSharedImpl (PortManager& mgr, std::string const & str)
192
	: _instance_name (str)
192
	: _instance_name (str)
193
	, _port_change_flag (0)
194
	, _portmap (new PortMap)
193
	, _portmap (new PortMap)
195
	, _ports (new PortIndex)
194
	, _ports (new PortIndex)
196
{
195
{
196
	g_atomic_int_set (&_port_change_flag, 0);
197
	pthread_mutex_init (&_port_callback_mutex, 0);
197
	pthread_mutex_init (&_port_callback_mutex, 0);
198
}
198
}
199
199
(-)Ardour-6.6.0.orig/libs/ardour/port_manager.cc (-1 / +1 lines)
Lines 144-151 PortManager::PortManager () Link Here
144
	, _midi_info_dirty (true)
144
	, _midi_info_dirty (true)
145
	, _audio_input_ports (new AudioInputPorts)
145
	, _audio_input_ports (new AudioInputPorts)
146
	, _midi_input_ports (new MIDIInputPorts)
146
	, _midi_input_ports (new MIDIInputPorts)
147
	, _reset_meters (0)
148
{
147
{
148
	g_atomic_int_set (&_reset_meters, 1);
149
	load_port_info ();
149
	load_port_info ();
150
}
150
}
151
151
(-)Ardour-6.6.0.orig/libs/ardour/presentation_info.cc (-3 / +3 lines)
Lines 48-54 string PresentationInfo::state_node_name Link Here
48
48
49
PBD::Signal1<void,PropertyChange const &> PresentationInfo::Change;
49
PBD::Signal1<void,PropertyChange const &> PresentationInfo::Change;
50
Glib::Threads::Mutex PresentationInfo::static_signal_lock;
50
Glib::Threads::Mutex PresentationInfo::static_signal_lock;
51
int PresentationInfo::_change_signal_suspended = 0;
51
GATOMIC_QUAL gint PresentationInfo::_change_signal_suspended = 0;
52
PBD::PropertyChange PresentationInfo::_pending_static_changes;
52
PBD::PropertyChange PresentationInfo::_pending_static_changes;
53
int PresentationInfo::selection_counter= 0;
53
int PresentationInfo::selection_counter= 0;
54
54
Lines 71-77 PresentationInfo::unsuspend_change_signa Link Here
71
{
71
{
72
	Glib::Threads::Mutex::Lock lm (static_signal_lock);
72
	Glib::Threads::Mutex::Lock lm (static_signal_lock);
73
73
74
	if (g_atomic_int_get (const_cast<gint*> (&_change_signal_suspended)) == 1) {
74
	if (g_atomic_int_get (&_change_signal_suspended) == 1) {
75
75
76
		/* atomically grab currently pending flags */
76
		/* atomically grab currently pending flags */
77
77
Lines 93-99 PresentationInfo::unsuspend_change_signa Link Here
93
		}
93
		}
94
	}
94
	}
95
95
96
	g_atomic_int_add (const_cast<gint*>(&_change_signal_suspended), -1);
96
	g_atomic_int_add (&_change_signal_suspended, -1);
97
}
97
}
98
98
99
void
99
void
(-)Ardour-6.6.0.orig/libs/ardour/route.cc (-3 / +4 lines)
Lines 114-122 Route::Route (Session& sess, string name Link Here
114
	, _active (true)
114
	, _active (true)
115
	, _signal_latency (0)
115
	, _signal_latency (0)
116
	, _disk_io_point (DiskIOPreFader)
116
	, _disk_io_point (DiskIOPreFader)
117
	, _pending_process_reorder (0)
118
	, _pending_listen_change (0)
119
	, _pending_signals (0)
120
	, _meter_point (MeterPostFader)
117
	, _meter_point (MeterPostFader)
121
	, _pending_meter_point (MeterPostFader)
118
	, _pending_meter_point (MeterPostFader)
122
	, _denormal_protection (false)
119
	, _denormal_protection (false)
Lines 136-141 Route::Route (Session& sess, string name Link Here
136
	, _patch_selector_dialog (0)
133
	, _patch_selector_dialog (0)
137
{
134
{
138
	processor_max_streams.reset();
135
	processor_max_streams.reset();
136
137
	g_atomic_int_set (&_pending_process_reorder, 0);
138
	g_atomic_int_set (&_pending_listen_change, 0);
139
	g_atomic_int_set (&_pending_signals, 0);
139
}
140
}
140
141
141
boost::weak_ptr<Route>
142
boost::weak_ptr<Route>
(-)Ardour-6.6.0.orig/libs/ardour/rt_tasklist.cc (-2 / +2 lines)
Lines 30-39 Link Here
30
using namespace ARDOUR;
30
using namespace ARDOUR;
31
31
32
RTTaskList::RTTaskList ()
32
RTTaskList::RTTaskList ()
33
	: _threads_active (0)
33
	: _task_run_sem ("rt_task_run", 0)
34
	, _task_run_sem ("rt_task_run", 0)
35
	, _task_end_sem ("rt_task_done", 0)
34
	, _task_end_sem ("rt_task_done", 0)
36
{
35
{
36
	g_atomic_int_set (&_threads_active, 0);
37
	reset_thread_list ();
37
	reset_thread_list ();
38
}
38
}
39
39
(-)Ardour-6.6.0.orig/libs/ardour/selection.cc (-4 / +4 lines)
Lines 45-52 CoreSelection::send_selection_change () Link Here
45
45
46
CoreSelection::CoreSelection (Session& s)
46
CoreSelection::CoreSelection (Session& s)
47
	: session (s)
47
	: session (s)
48
	, selection_order (0)
49
{
48
{
49
	g_atomic_int_set (&_selection_order, 0);
50
}
50
}
51
51
52
CoreSelection::~CoreSelection ()
52
CoreSelection::~CoreSelection ()
Lines 246-252 CoreSelection::set (StripableList& sl) Link Here
246
246
247
		for (StripableList::iterator s = sl.begin(); s != sl.end(); ++s) {
247
		for (StripableList::iterator s = sl.begin(); s != sl.end(); ++s) {
248
248
249
			SelectedStripable ss (*s, no_control, g_atomic_int_add (&selection_order, 1));
249
			SelectedStripable ss (*s, no_control, g_atomic_int_add (&_selection_order, 1));
250
250
251
			if (_stripables.insert (ss).second) {
251
			if (_stripables.insert (ss).second) {
252
				DEBUG_TRACE (DEBUG::Selection, string_compose ("set:added %1 to s/c selection\n", (*s)->name()));
252
				DEBUG_TRACE (DEBUG::Selection, string_compose ("set:added %1 to s/c selection\n", (*s)->name()));
Lines 293-299 CoreSelection::add (boost::shared_ptr<St Link Here
293
	{
293
	{
294
		Glib::Threads::RWLock::WriterLock lm (_lock);
294
		Glib::Threads::RWLock::WriterLock lm (_lock);
295
295
296
		SelectedStripable ss (s, c, g_atomic_int_add (&selection_order, 1));
296
		SelectedStripable ss (s, c, g_atomic_int_add (&_selection_order, 1));
297
297
298
		if (_stripables.insert (ss).second) {
298
		if (_stripables.insert (ss).second) {
299
			DEBUG_TRACE (DEBUG::Selection, string_compose ("added %1/%2 to s/c selection\n", s->name(), c));
299
			DEBUG_TRACE (DEBUG::Selection, string_compose ("added %1/%2 to s/c selection\n", s->name(), c));
Lines 355-361 CoreSelection::set (boost::shared_ptr<St Link Here
355
	{
355
	{
356
		Glib::Threads::RWLock::WriterLock lm (_lock);
356
		Glib::Threads::RWLock::WriterLock lm (_lock);
357
357
358
		SelectedStripable ss (s, c, g_atomic_int_add (&selection_order, 1));
358
		SelectedStripable ss (s, c, g_atomic_int_add (&_selection_order, 1));
359
359
360
		if (_stripables.size() == 1 && _stripables.find (ss) != _stripables.end()) {
360
		if (_stripables.size() == 1 && _stripables.find (ss) != _stripables.end()) {
361
			return;
361
			return;
(-)Ardour-6.6.0.orig/libs/ardour/session.cc (-17 / +18 lines)
Lines 185-194 Session::Session (AudioEngine &eng, Link Here
185
	, _base_sample_rate (0)
185
	, _base_sample_rate (0)
186
	, _nominal_sample_rate (0)
186
	, _nominal_sample_rate (0)
187
	, _current_sample_rate (0)
187
	, _current_sample_rate (0)
188
	, _record_status (Disabled)
189
	, _transport_sample (0)
188
	, _transport_sample (0)
190
	, _seek_counter (0)
191
	, _butler_seek_counter (0)
192
	, _session_range_location (0)
189
	, _session_range_location (0)
193
	, _session_range_is_free (true)
190
	, _session_range_is_free (true)
194
	, _silent (false)
191
	, _silent (false)
Lines 236-242 Session::Session (AudioEngine &eng, Link Here
236
	, state_tree (0)
233
	, state_tree (0)
237
	, state_was_pending (false)
234
	, state_was_pending (false)
238
	, _state_of_the_state (StateOfTheState (CannotSave | InitialConnecting | Loading))
235
	, _state_of_the_state (StateOfTheState (CannotSave | InitialConnecting | Loading))
239
	, _suspend_save (0)
240
	, _save_queued (false)
236
	, _save_queued (false)
241
	, _save_queued_pending (false)
237
	, _save_queued_pending (false)
242
	, _last_roll_location (0)
238
	, _last_roll_location (0)
Lines 248-260 Session::Session (AudioEngine &eng, Link Here
248
	, _n_lua_scripts (0)
244
	, _n_lua_scripts (0)
249
	, _butler (new Butler (*this))
245
	, _butler (new Butler (*this))
250
	, _transport_fsm (new TransportFSM (*this))
246
	, _transport_fsm (new TransportFSM (*this))
251
	, _post_transport_work (0)
252
	, _locations (new Locations (*this))
247
	, _locations (new Locations (*this))
253
	, _ignore_skips_updates (false)
248
	, _ignore_skips_updates (false)
254
	, _rt_thread_active (false)
249
	, _rt_thread_active (false)
255
	, _rt_emit_pending (false)
250
	, _rt_emit_pending (false)
256
	, _ac_thread_active (0)
251
	, _ac_thread_active (0)
257
	, _latency_recompute_pending (0)
258
	, step_speed (0)
252
	, step_speed (0)
259
	, outbound_mtc_timecode_frame (0)
253
	, outbound_mtc_timecode_frame (0)
260
	, next_quarter_frame_to_send (-1)
254
	, next_quarter_frame_to_send (-1)
Lines 278-285 Session::Session (AudioEngine &eng, Link Here
278
	, ltc_timecode_offset (0)
272
	, ltc_timecode_offset (0)
279
	, ltc_timecode_negative_offset (false)
273
	, ltc_timecode_negative_offset (false)
280
	, midi_control_ui (0)
274
	, midi_control_ui (0)
281
	, _punch_or_loop (NoConstraint)
282
	, current_usecs_per_track (1000)
283
	, _tempo_map (0)
275
	, _tempo_map (0)
284
	, _all_route_group (new RouteGroup (*this, "all"))
276
	, _all_route_group (new RouteGroup (*this, "all"))
285
	, routes (new RouteList)
277
	, routes (new RouteList)
Lines 292-299 Session::Session (AudioEngine &eng, Link Here
292
	, _total_free_4k_blocks (0)
284
	, _total_free_4k_blocks (0)
293
	, _total_free_4k_blocks_uncertain (false)
285
	, _total_free_4k_blocks_uncertain (false)
294
	, no_questions_about_missing_files (false)
286
	, no_questions_about_missing_files (false)
295
	, _playback_load (0)
296
	, _capture_load (0)
297
	, _bundles (new BundleList)
287
	, _bundles (new BundleList)
298
	, _bundle_xml_node (0)
288
	, _bundle_xml_node (0)
299
	, _current_trans (0)
289
	, _current_trans (0)
Lines 314-323 Session::Session (AudioEngine &eng, Link Here
314
	, first_file_data_format_reset (true)
304
	, first_file_data_format_reset (true)
315
	, first_file_header_format_reset (true)
305
	, first_file_header_format_reset (true)
316
	, have_looped (false)
306
	, have_looped (false)
317
	, _have_rec_enabled_track (false)
318
	, _have_rec_disabled_track (true)
319
	, _step_editors (0)
307
	, _step_editors (0)
320
	, _suspend_timecode_transmission (0)
321
	,  _speakers (new Speakers)
308
	,  _speakers (new Speakers)
322
	, _ignore_route_processor_changes (0)
309
	, _ignore_route_processor_changes (0)
323
	, _ignored_a_processor_change (0)
310
	, _ignored_a_processor_change (0)
Lines 329-336 Session::Session (AudioEngine &eng, Link Here
329
	, _selection (new CoreSelection (*this))
316
	, _selection (new CoreSelection (*this))
330
	, _global_locate_pending (false)
317
	, _global_locate_pending (false)
331
	, _had_destructive_tracks (false)
318
	, _had_destructive_tracks (false)
332
	, _update_pretty_names (0)
333
{
319
{
320
	g_atomic_int_set (&_suspend_save, 0);
321
	g_atomic_int_set (&_playback_load, 0);
322
	g_atomic_int_set (&_capture_load, 0);
323
	g_atomic_int_set (&_post_transport_work, 0);
324
	g_atomic_int_set (&_processing_prohibited, Disabled);
325
	g_atomic_int_set (&_record_status, Disabled);
326
	g_atomic_int_set (&_punch_or_loop, NoConstraint);
327
	g_atomic_int_set (&_current_usecs_per_track, 1000);
328
	g_atomic_int_set (&_have_rec_enabled_track, 0);
329
	g_atomic_int_set (&_have_rec_disabled_track, 1);
330
	g_atomic_int_set (&_latency_recompute_pending, 0);
331
	g_atomic_int_set (&_suspend_timecode_transmission, 0);
332
	g_atomic_int_set (&_update_pretty_names, 0);
333
	g_atomic_int_set (&_seek_counter, 0);
334
	g_atomic_int_set (&_butler_seek_counter, 0);
335
334
	created_with = string_compose ("%1 %2", PROGRAM_NAME, revision);
336
	created_with = string_compose ("%1 %2", PROGRAM_NAME, revision);
335
337
336
	pthread_mutex_init (&_rt_emit_mutex, 0);
338
	pthread_mutex_init (&_rt_emit_mutex, 0);
Lines 6101-6113 Session::add_automation_list(AutomationL Link Here
6101
bool
6103
bool
6102
Session::have_rec_enabled_track () const
6104
Session::have_rec_enabled_track () const
6103
{
6105
{
6104
	return g_atomic_int_get (const_cast<gint*>(&_have_rec_enabled_track)) == 1;
6106
	return g_atomic_int_get (&_have_rec_enabled_track) == 1;
6105
}
6107
}
6106
6108
6107
bool
6109
bool
6108
Session::have_rec_disabled_track () const
6110
Session::have_rec_disabled_track () const
6109
{
6111
{
6110
	return g_atomic_int_get (const_cast<gint*>(&_have_rec_disabled_track)) == 1;
6112
	return g_atomic_int_get (&_have_rec_disabled_track) == 1;
6111
}
6113
}
6112
6114
6113
/** Update the state of our rec-enabled tracks flag */
6115
/** Update the state of our rec-enabled tracks flag */
Lines 7150-7156 Session::auto_connect_thread_run () Link Here
7150
			}
7152
			}
7151
		}
7153
		}
7152
7154
7153
7154
		if (_midi_ports && g_atomic_int_get (&_update_pretty_names)) {
7155
		if (_midi_ports && g_atomic_int_get (&_update_pretty_names)) {
7155
			boost::shared_ptr<Port> ap = boost::dynamic_pointer_cast<Port> (vkbd_output_port ());
7156
			boost::shared_ptr<Port> ap = boost::dynamic_pointer_cast<Port> (vkbd_output_port ());
7156
			if (ap->pretty_name () != _("Virtual Keyboard")) {
7157
			if (ap->pretty_name () != _("Virtual Keyboard")) {
(-)Ardour-6.6.0.orig/libs/ardour/session_process.cc (-2 / +2 lines)
Lines 1357-1363 Session::plan_master_strategy (pframes_t Link Here
1357
			 * session (so far).
1357
			 * session (so far).
1358
			 */
1358
			 */
1359
1359
1360
			locate_target += wlp + lrintf (ntracks() * sample_rate() * (1.5 * (current_usecs_per_track / 1000000.0)));
1360
			locate_target += wlp + lrintf (ntracks() * sample_rate() * (1.5 * (g_atomic_int_get (&_current_usecs_per_track) / 1000000.0)));
1361
1361
1362
			DEBUG_TRACE (DEBUG::Slave, string_compose ("After locate-to-catch-master, still too far off (%1). Locate again to %2\n", delta, locate_target));
1362
			DEBUG_TRACE (DEBUG::Slave, string_compose ("After locate-to-catch-master, still too far off (%1). Locate again to %2\n", delta, locate_target));
1363
1363
Lines 1415-1421 Session::plan_master_strategy (pframes_t Link Here
1415
1415
1416
		samplepos_t locate_target = master_transport_sample;
1416
		samplepos_t locate_target = master_transport_sample;
1417
1417
1418
		locate_target += wlp + lrintf (ntracks() * sample_rate() * (1.5 * (current_usecs_per_track / 1000000.0)));
1418
		locate_target += wlp + lrintf (ntracks() * sample_rate() * (1.5 * (g_atomic_int_get (&_current_usecs_per_track) / 1000000.0)));
1419
1419
1420
		DEBUG_TRACE (DEBUG::Slave, string_compose ("request locate to master position %1\n", locate_target));
1420
		DEBUG_TRACE (DEBUG::Slave, string_compose ("request locate to master position %1\n", locate_target));
1421
1421
(-)Ardour-6.6.0.orig/libs/ardour/session_state.cc (-1 / +1 lines)
Lines 178-184 Session::pre_engine_init (string fullpat Link Here
178
	*/
178
	*/
179
179
180
	timerclear (&last_mmc_step);
180
	timerclear (&last_mmc_step);
181
	g_atomic_int_set (&processing_prohibited, 0);
181
	g_atomic_int_set (&_processing_prohibited, 0);
182
	g_atomic_int_set (&_record_status, Disabled);
182
	g_atomic_int_set (&_record_status, Disabled);
183
	g_atomic_int_set (&_playback_load, 100);
183
	g_atomic_int_set (&_playback_load, 100);
184
	g_atomic_int_set (&_capture_load, 100);
184
	g_atomic_int_set (&_capture_load, 100);
(-)Ardour-6.6.0.orig/libs/ardour/session_transport.cc (-2 / +2 lines)
Lines 1323-1330 Session::non_realtime_locate () Link Here
1323
#ifndef NDEBUG
1323
#ifndef NDEBUG
1324
		std::cerr << "locate to " << tf << " took " << (end - start) << " usecs for " << nt << " tracks = " << usecs_per_track << " per track\n";
1324
		std::cerr << "locate to " << tf << " took " << (end - start) << " usecs for " << nt << " tracks = " << usecs_per_track << " per track\n";
1325
#endif
1325
#endif
1326
		if (usecs_per_track > g_atomic_int_get (&current_usecs_per_track)) {
1326
		if (usecs_per_track > g_atomic_int_get (&_current_usecs_per_track)) {
1327
			g_atomic_int_set (&current_usecs_per_track, usecs_per_track);
1327
			g_atomic_int_set (&_current_usecs_per_track, usecs_per_track);
1328
		}
1328
		}
1329
	}
1329
	}
1330
1330
(-)Ardour-6.6.0.orig/libs/ardour/source.cc (-3 / +4 lines)
Lines 67-77 Source::Source (Session& s, DataType typ Link Here
67
	, _flags(flags)
67
	, _flags(flags)
68
	, _natural_position(0)
68
	, _natural_position(0)
69
	, _have_natural_position (false)
69
	, _have_natural_position (false)
70
	, _use_count (0)
71
	, _level (0)
70
	, _level (0)
72
{
71
{
72
	g_atomic_int_set (&_use_count, 0);
73
	_analysed = false;
73
	_analysed = false;
74
	_timestamp = 0;
74
	_timestamp = 0;
75
75
	fix_writable_flags ();
76
	fix_writable_flags ();
76
}
77
}
77
78
Lines 81-91 Source::Source (Session& s, const XMLNod Link Here
81
	, _flags (Flag (Writable|CanRename))
82
	, _flags (Flag (Writable|CanRename))
82
	, _natural_position(0)
83
	, _natural_position(0)
83
	, _have_natural_position (false)
84
	, _have_natural_position (false)
84
        , _use_count (0)
85
	, _level (0)
85
	, _level (0)
86
{
86
{
87
	_timestamp = 0;
87
	g_atomic_int_set (&_use_count, 0);
88
	_analysed = false;
88
	_analysed = false;
89
	_timestamp = 0;
89
90
90
	if (set_state (node, Stateful::loading_state_version) || _type == DataType::NIL) {
91
	if (set_state (node, Stateful::loading_state_version) || _type == DataType::NIL) {
91
		throw failed_constructor();
92
		throw failed_constructor();
(-)Ardour-6.6.0.orig/libs/audiographer/audiographer/general/threader.h (-8 / +12 lines)
Lines 10-15 Link Here
10
#include <vector>
10
#include <vector>
11
#include <algorithm>
11
#include <algorithm>
12
12
13
#include "pbd/g_atomic_compat.h"
14
13
#include "audiographer/visibility.h"
15
#include "audiographer/visibility.h"
14
#include "audiographer/source.h"
16
#include "audiographer/source.h"
15
#include "audiographer/sink.h"
17
#include "audiographer/sink.h"
Lines 47-55 class /*LIBAUDIOGRAPHER_API*/ Threader : Link Here
47
	  */
49
	  */
48
	Threader (Glib::ThreadPool & thread_pool, long wait_timeout_milliseconds = 500)
50
	Threader (Glib::ThreadPool & thread_pool, long wait_timeout_milliseconds = 500)
49
	  : thread_pool (thread_pool)
51
	  : thread_pool (thread_pool)
50
	  , readers (0)
51
	  , wait_timeout (wait_timeout_milliseconds)
52
	  , wait_timeout (wait_timeout_milliseconds)
52
	{ }
53
	{
54
		g_atomic_int_set (&readers, 0);
55
	}
53
56
54
	virtual ~Threader () {}
57
	virtual ~Threader () {}
55
58
Lines 117-129 class /*LIBAUDIOGRAPHER_API*/ Threader : Link Here
117
120
118
	OutputVec outputs;
121
	OutputVec outputs;
119
122
120
	Glib::ThreadPool & thread_pool;
123
	Glib::ThreadPool&    thread_pool;
121
        Glib::Threads::Mutex wait_mutex;
124
	Glib::Threads::Mutex wait_mutex;
122
        Glib::Threads::Cond  wait_cond;
125
	Glib::Threads::Cond  wait_cond;
123
	gint        readers;
126
124
	long        wait_timeout;
127
	GATOMIC_QUAL gint readers;
128
	long         wait_timeout;
125
129
126
        Glib::Threads::Mutex exception_mutex;
130
	Glib::Threads::Mutex exception_mutex;
127
	boost::shared_ptr<ThreaderException> exception;
131
	boost::shared_ptr<ThreaderException> exception;
128
132
129
};
133
};
(-)Ardour-6.6.0.orig/libs/backends/alsa/alsa_slave.cc (-7 / +8 lines)
Lines 45-51 AlsaAudioSlave::AlsaAudioSlave ( Link Here
45
	, _samples_since_dll_reset (0)
45
	, _samples_since_dll_reset (0)
46
	, _ratio (1.0)
46
	, _ratio (1.0)
47
	, _slave_speed (1.0)
47
	, _slave_speed (1.0)
48
	, _draining (1)
49
	, _rb_capture (4 * /* AlsaAudioBackend::_max_buffer_size */ 8192 * _pcmi.ncapt ())
48
	, _rb_capture (4 * /* AlsaAudioBackend::_max_buffer_size */ 8192 * _pcmi.ncapt ())
50
	, _rb_playback (4 * /* AlsaAudioBackend::_max_buffer_size */ 8192 * _pcmi.nplay ())
49
	, _rb_playback (4 * /* AlsaAudioBackend::_max_buffer_size */ 8192 * _pcmi.nplay ())
51
	, _samples_per_period (master_samples_per_period)
50
	, _samples_per_period (master_samples_per_period)
Lines 53-58 AlsaAudioSlave::AlsaAudioSlave ( Link Here
53
	, _play_buff (0)
52
	, _play_buff (0)
54
	, _src_buff (0)
53
	, _src_buff (0)
55
{
54
{
55
	g_atomic_int_set (&_draining, 1);
56
56
	if (0 != _pcmi.state()) {
57
	if (0 != _pcmi.state()) {
57
		return;
58
		return;
58
	}
59
	}
Lines 266-272 AlsaAudioSlave::process_thread () Link Here
266
				_rb_capture.increment_write_idx (spp * nchn);
267
				_rb_capture.increment_write_idx (spp * nchn);
267
#endif
268
#endif
268
			} else {
269
			} else {
269
				g_atomic_int_set(&_draining, 1);
270
				g_atomic_int_set (&_draining, 1);
270
			}
271
			}
271
			_pcmi.capt_done (spp);
272
			_pcmi.capt_done (spp);
272
273
Lines 341-347 AlsaAudioSlave::process_thread () Link Here
341
		if (xrun && (_pcmi.capt_xrun() > 0 || _pcmi.play_xrun() > 0)) {
342
		if (xrun && (_pcmi.capt_xrun() > 0 || _pcmi.play_xrun() > 0)) {
342
			reset_dll = true;
343
			reset_dll = true;
343
			_samples_since_dll_reset = 0;
344
			_samples_since_dll_reset = 0;
344
			g_atomic_int_set(&_draining, 1);
345
			g_atomic_int_set (&_draining, 1);
345
		}
346
		}
346
	}
347
	}
347
348
Lines 372-378 AlsaAudioSlave::cycle_start (double tme, Link Here
372
	}
373
	}
373
374
374
	if (drain) {
375
	if (drain) {
375
		g_atomic_int_set(&_draining, 1);
376
		g_atomic_int_set (&_draining, 1);
376
		return;
377
		return;
377
	}
378
	}
378
379
Lines 501-511 AlsaAudioSlave::cycle_end () Link Here
501
#ifndef NDEBUG
502
#ifndef NDEBUG
502
		std::cerr << "ALSA Slave: Playback Ringbuffer Overflow\n"; // XXX DEBUG
503
		std::cerr << "ALSA Slave: Playback Ringbuffer Overflow\n"; // XXX DEBUG
503
#endif
504
#endif
504
		g_atomic_int_set(&_draining, 1);
505
		g_atomic_int_set (&_draining, 1);
505
		return;
506
		return;
506
	}
507
	}
507
	if (drain_done) {
508
	if (drain_done) {
508
		g_atomic_int_set(&_draining, 0);
509
		g_atomic_int_set (&_draining, 0);
509
	}
510
	}
510
}
511
}
511
512
Lines 513-519 void Link Here
513
AlsaAudioSlave::freewheel (bool onoff)
514
AlsaAudioSlave::freewheel (bool onoff)
514
{
515
{
515
	if (onoff) {
516
	if (onoff) {
516
		g_atomic_int_set(&_draining, 1);
517
		g_atomic_int_set (&_draining, 1);
517
	}
518
	}
518
}
519
}
519
520
(-)Ardour-6.6.0.orig/libs/backends/alsa/alsa_slave.h (-1 / +4 lines)
Lines 22-27 Link Here
22
#include <pthread.h>
22
#include <pthread.h>
23
23
24
#include "pbd/ringbuffer.h"
24
#include "pbd/ringbuffer.h"
25
#include "pbd/g_atomic_compat.h"
26
25
#include "zita-resampler/vresampler.h"
27
#include "zita-resampler/vresampler.h"
26
#include "zita-alsa-pcmi.h"
28
#include "zita-alsa-pcmi.h"
27
29
Lines 81-87 private: Link Here
81
	double   _play_latency;
83
	double   _play_latency;
82
84
83
	volatile double _slave_speed;
85
	volatile double _slave_speed;
84
	volatile gint   _draining;
86
87
	GATOMIC_QUAL gint _draining;
85
88
86
	PBD::RingBuffer<float> _rb_capture;
89
	PBD::RingBuffer<float> _rb_capture;
87
	PBD::RingBuffer<float> _rb_playback;
90
	PBD::RingBuffer<float> _rb_playback;
(-)Ardour-6.6.0.orig/libs/evoral/Event.cc (-1 / +2 lines)
Lines 21-32 Link Here
21
21
22
#include <glib.h>
22
#include <glib.h>
23
23
24
#include "pbd/g_atomic_compat.h"
24
#include "temporal/beats.h"
25
#include "temporal/beats.h"
25
#include "evoral/Event.h"
26
#include "evoral/Event.h"
26
27
27
namespace Evoral {
28
namespace Evoral {
28
29
29
static event_id_t _event_id_counter = 0;
30
static GATOMIC_QUAL event_id_t _event_id_counter = 0;
30
31
31
event_id_t
32
event_id_t
32
event_id_counter()
33
event_id_counter()
(-)Ardour-6.6.0.orig/libs/pbd/pbd/atomic_counter.h (-9 / +7 lines)
Lines 20-29 Link Here
20
#ifndef PBD_ATOMIC_COUNTER_H
20
#ifndef PBD_ATOMIC_COUNTER_H
21
#define PBD_ATOMIC_COUNTER_H
21
#define PBD_ATOMIC_COUNTER_H
22
22
23
#include <glib.h>
23
#include "pbd/g_atomic_compat.h"
24
24
25
namespace PBD {
25
namespace PBD {
26
26
27
#include <glib.h>
27
class atomic_counter
28
class atomic_counter
28
{
29
{
29
	/**
30
	/**
Lines 35-47 class atomic_counter Link Here
35
public:
36
public:
36
37
37
	atomic_counter (gint value = 0)
38
	atomic_counter (gint value = 0)
38
		:
39
	{
39
			m_value(value)
40
		g_atomic_int_set (&m_value, value);
40
	{ }
41
	}
41
42
42
	gint get() const
43
	gint get() const
43
	{
44
	{
44
		return g_atomic_int_get (const_cast<gint*>(&m_value));
45
		return g_atomic_int_get (&m_value);
45
	}
46
	}
46
47
47
	void set (gint new_value)
48
	void set (gint new_value)
Lines 88-97 public: Link Here
88
	}
89
	}
89
90
90
private:
91
private:
91
92
	mutable GATOMIC_QUAL gint m_value;
92
	// Has to be mutable when using the apple version of gcc.
93
	gint m_value;
94
95
};
93
};
96
94
97
} // namespace PBD
95
} // namespace PBD
(-)Ardour-6.6.0.orig/libs/pbd/pbd/g_atomic_compat.h (+39 lines)
Line 0 Link Here
1
/*
2
 * Copyright (C) 2021 Robin Gareus <robin@gareus.org>
3
 *
4
 * This program is free software; you can redistribute it and/or modify
5
 * it under the terms of the GNU General Public License as published by
6
 * the Free Software Foundation; either version 2 of the License, or
7
 * (at your option) any later version.
8
 *
9
 * This program is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 * GNU General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU General Public License along
15
 * with this program; if not, write to the Free Software Foundation, Inc.,
16
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
 */
18
19
#ifndef _PBD_G_ATOMIC_COMPAT_H_
20
#define _PBD_G_ATOMIC_COMPAT_H_
21
22
/* requires for gint, guint, gpointer */
23
#include <glib.h>
24
25
/* This is to for g_atomic_* compatibility with glib >= 2.68 and gcc-11
26
 *
27
 * "While atomic has a volatile qualifier, this is a historical artifact and the pointer passed to it should not be volatile."
28
 * (https://developer.gnome.org/glib/2.68/glib-Atomic-Operations.html)
29
 *
30
 * Older versions of glib and older compilers still expect a volatile qualifier and print
31
 * "cast from type 'volatile long int*' to type 'long int*' casts away qualifiers [-Wcast-qual]"
32
 */
33
#if defined HAVE_GLIB_2_68 && (defined(__cplusplus) && __cplusplus >= 201103L)
34
#  define GATOMIC_QUAL
35
#else
36
#  define GATOMIC_QUAL volatile
37
#endif
38
39
#endif
(-)Ardour-6.6.0.orig/libs/pbd/pbd/mpmc_queue.h (-4 / +6 lines)
Lines 23-28 Link Here
23
#include <glib.h>
23
#include <glib.h>
24
#include <stdint.h>
24
#include <stdint.h>
25
25
26
#include "pbd/g_atomic_compat.h"
27
26
namespace PBD {
28
namespace PBD {
27
29
28
/** Lock free multiple producer, multiple consumer queue
30
/** Lock free multiple producer, multiple consumer queue
Lines 131-145 public: Link Here
131
133
132
private:
134
private:
133
	struct cell_t {
135
	struct cell_t {
134
		volatile guint _sequence;
136
		GATOMIC_QUAL guint _sequence;
135
		T              _data;
137
		T                  _data;
136
	};
138
	};
137
139
138
	cell_t* _buffer;
140
	cell_t* _buffer;
139
	size_t  _buffer_mask;
141
	size_t  _buffer_mask;
140
142
141
	volatile gint _enqueue_pos;
143
	GATOMIC_QUAL gint _enqueue_pos;
142
	volatile gint _dequeue_pos;
144
	GATOMIC_QUAL gint _dequeue_pos;
143
};
145
};
144
146
145
} /* end namespace */
147
} /* end namespace */
(-)Ardour-6.6.0.orig/libs/pbd/pbd/playback_buffer.h (-9 / +10 lines)
Lines 26-31 Link Here
26
26
27
#include "pbd/libpbd_visibility.h"
27
#include "pbd/libpbd_visibility.h"
28
#include "pbd/spinlock.h"
28
#include "pbd/spinlock.h"
29
#include "pbd/g_atomic_compat.h"
29
30
30
namespace PBD {
31
namespace PBD {
31
32
Lines 73-81 public: Link Here
73
	/* called from rt (reader) thread for new buffers */
74
	/* called from rt (reader) thread for new buffers */
74
	void align_to (PlaybackBuffer const& other) {
75
	void align_to (PlaybackBuffer const& other) {
75
		Glib::Threads::Mutex::Lock lm (_reset_lock);
76
		Glib::Threads::Mutex::Lock lm (_reset_lock);
76
		write_idx = other.write_idx;
77
		g_atomic_int_set (&read_idx, g_atomic_int_get (&other.read_idx));
77
		read_idx  = other.read_idx;
78
		g_atomic_int_set (&write_idx, g_atomic_int_get (&other.write_idx));
78
		reserved  = other.reserved;
79
		g_atomic_int_set (&reserved, g_atomic_int_get (&other.reserved));
79
		memset (buf, 0, size * sizeof (T));
80
		memset (buf, 0, size * sizeof (T));
80
	}
81
	}
81
82
Lines 190-198 public: Link Here
190
		}
191
		}
191
	}
192
	}
192
193
193
	guint read_ptr() const { return read_idx; }
194
	guint read_ptr() const { return g_atomic_int_get (&read_idx); }
194
	guint write_ptr() const { return write_idx; }
195
	guint write_ptr() const { return g_atomic_int_get (&write_idx); }
195
	guint reserved_size() const { return reserved; }
196
	guint reserved_size() const { return g_atomic_int_get (&reserved); }
196
	guint reservation_size() const { return reservation; }
197
	guint reservation_size() const { return reservation; }
197
198
198
private:
199
private:
Lines 201-209 private: Link Here
201
	guint size;
202
	guint size;
202
	guint size_mask;
203
	guint size_mask;
203
204
204
	mutable gint write_idx;
205
	mutable GATOMIC_QUAL gint write_idx;
205
	mutable gint read_idx;
206
	mutable GATOMIC_QUAL gint read_idx;
206
	mutable gint reserved;
207
	mutable GATOMIC_QUAL gint reserved;
207
208
208
	/* spinlock will be used to update write_idx and reserved in sync */
209
	/* spinlock will be used to update write_idx and reserved in sync */
209
	spinlock_t _reservation_lock;
210
	spinlock_t _reservation_lock;
(-)Ardour-6.6.0.orig/libs/pbd/pbd/rcu.h (-4 / +5 lines)
Lines 27-32 Link Here
27
#include <list>
27
#include <list>
28
28
29
#include "pbd/libpbd_visibility.h"
29
#include "pbd/libpbd_visibility.h"
30
#include "pbd/g_atomic_compat.h"
30
31
31
/** @file rcu.h
32
/** @file rcu.h
32
 * Define a set of classes to implement Read-Copy-Update.  We do not attempt to define RCU here - use google.
33
 * Define a set of classes to implement Read-Copy-Update.  We do not attempt to define RCU here - use google.
Lines 52-59 class /*LIBPBD_API*/ RCUManager Link Here
52
{
53
{
53
public:
54
public:
54
	RCUManager (T* new_rcu_value)
55
	RCUManager (T* new_rcu_value)
55
		: _active_reads (0)
56
	{
56
	{
57
		g_atomic_int_set (&_active_reads, 0);
57
		x.rcu_value = new boost::shared_ptr<T> (new_rcu_value);
58
		x.rcu_value = new boost::shared_ptr<T> (new_rcu_value);
58
	}
59
	}
59
60
Lines 99-106 protected: Link Here
99
	 * evaluate to the same address.
100
	 * evaluate to the same address.
100
	 */
101
	 */
101
	union {
102
	union {
102
		boost::shared_ptr<T>*     rcu_value;
103
		boost::shared_ptr<T>*         rcu_value;
103
		mutable volatile gpointer gptr;
104
		mutable GATOMIC_QUAL gpointer gptr;
104
	} x;
105
	} x;
105
106
106
	inline bool active_read () const {
107
	inline bool active_read () const {
Lines 108-114 protected: Link Here
108
	}
109
	}
109
110
110
private:
111
private:
111
	mutable volatile gint _active_reads;
112
	mutable GATOMIC_QUAL gint _active_reads;
112
};
113
};
113
114
114
/** Serialized RCUManager implements the RCUManager interface. It is based on the
115
/** Serialized RCUManager implements the RCUManager interface. It is based on the
(-)Ardour-6.6.0.orig/libs/pbd/pbd/ringbuffer.h (-7 / +7 lines)
Lines 24-32 Link Here
24
#define ringbuffer_h
24
#define ringbuffer_h
25
25
26
#include <cstring>
26
#include <cstring>
27
#include <glib.h>
28
27
29
#include "pbd/libpbd_visibility.h"
28
#include "pbd/libpbd_visibility.h"
29
#include "pbd/g_atomic_compat.h"
30
30
31
namespace PBD {
31
namespace PBD {
32
32
Lines 122-130 public: Link Here
122
protected:
122
protected:
123
	T *buf;
123
	T *buf;
124
	guint size;
124
	guint size;
125
	mutable gint write_idx;
126
	mutable gint read_idx;
127
	guint size_mask;
125
	guint size_mask;
126
	mutable GATOMIC_QUAL gint write_idx;
127
	mutable GATOMIC_QUAL gint read_idx;
128
128
129
private:
129
private:
130
	RingBuffer (RingBuffer const&);
130
	RingBuffer (RingBuffer const&);
Lines 139-145 RingBuffer<T>::read (T *dest, guint cnt) Link Here
139
	guint n1, n2;
139
	guint n1, n2;
140
	guint priv_read_idx;
140
	guint priv_read_idx;
141
141
142
	priv_read_idx=g_atomic_int_get(&read_idx);
142
	priv_read_idx = g_atomic_int_get (&read_idx);
143
143
144
	if ((free_cnt = read_space ()) == 0) {
144
	if ((free_cnt = read_space ()) == 0) {
145
		return 0;
145
		return 0;
Lines 165-171 RingBuffer<T>::read (T *dest, guint cnt) Link Here
165
		priv_read_idx = n2;
165
		priv_read_idx = n2;
166
	}
166
	}
167
167
168
	g_atomic_int_set(&read_idx, priv_read_idx);
168
	g_atomic_int_set (&read_idx, priv_read_idx);
169
	return to_read;
169
	return to_read;
170
}
170
}
171
171
Lines 179-185 RingBuffer<T>::write (T const *src, guin Link Here
179
	guint n1, n2;
179
	guint n1, n2;
180
	guint priv_write_idx;
180
	guint priv_write_idx;
181
181
182
	priv_write_idx=g_atomic_int_get(&write_idx);
182
	priv_write_idx = g_atomic_int_get (&write_idx);
183
183
184
	if ((free_cnt = write_space ()) == 0) {
184
	if ((free_cnt = write_space ()) == 0) {
185
		return 0;
185
		return 0;
Lines 205-211 RingBuffer<T>::write (T const *src, guin Link Here
205
		priv_write_idx = n2;
205
		priv_write_idx = n2;
206
	}
206
	}
207
207
208
	g_atomic_int_set(&write_idx, priv_write_idx);
208
	g_atomic_int_set (&write_idx, priv_write_idx);
209
	return to_write;
209
	return to_write;
210
}
210
}
211
211
(-)Ardour-6.6.0.orig/libs/pbd/pbd/ringbufferNPT.h (-6 / +7 lines)
Lines 27-32 Link Here
27
#include <glib.h>
27
#include <glib.h>
28
28
29
#include "pbd/libpbd_visibility.h"
29
#include "pbd/libpbd_visibility.h"
30
#include "pbd/g_atomic_compat.h"
30
31
31
namespace PBD {
32
namespace PBD {
32
33
Lines 118-125 class /*LIBPBD_API*/ RingBufferNPT Link Here
118
  protected:
119
  protected:
119
	T *buf;
120
	T *buf;
120
	size_t size;
121
	size_t size;
121
	mutable gint write_ptr;
122
	mutable GATOMIC_QUAL gint write_ptr;
122
	mutable gint read_ptr;
123
	mutable GATOMIC_QUAL gint read_ptr;
123
124
124
private:
125
private:
125
	RingBufferNPT (RingBufferNPT const&);
126
	RingBufferNPT (RingBufferNPT const&);
Lines 134-140 RingBufferNPT<T>::read (T *dest, size_t Link Here
134
        size_t n1, n2;
135
        size_t n1, n2;
135
        size_t priv_read_ptr;
136
        size_t priv_read_ptr;
136
137
137
        priv_read_ptr=g_atomic_int_get(&read_ptr);
138
        priv_read_ptr = g_atomic_int_get (&read_ptr);
138
139
139
        if ((free_cnt = read_space ()) == 0) {
140
        if ((free_cnt = read_space ()) == 0) {
140
                return 0;
141
                return 0;
Lines 160-166 RingBufferNPT<T>::read (T *dest, size_t Link Here
160
                priv_read_ptr = n2;
161
                priv_read_ptr = n2;
161
        }
162
        }
162
163
163
        g_atomic_int_set(&read_ptr, priv_read_ptr);
164
        g_atomic_int_set (&read_ptr, priv_read_ptr);
164
        return to_read;
165
        return to_read;
165
}
166
}
166
167
Lines 173-179 RingBufferNPT<T>::write (const T *src, s Link Here
173
        size_t n1, n2;
174
        size_t n1, n2;
174
        size_t priv_write_ptr;
175
        size_t priv_write_ptr;
175
176
176
        priv_write_ptr=g_atomic_int_get(&write_ptr);
177
        priv_write_ptr = g_atomic_int_get (&write_ptr);
177
178
178
        if ((free_cnt = write_space ()) == 0) {
179
        if ((free_cnt = write_space ()) == 0) {
179
                return 0;
180
                return 0;
Lines 199-205 RingBufferNPT<T>::write (const T *src, s Link Here
199
                priv_write_ptr = n2;
200
                priv_write_ptr = n2;
200
        }
201
        }
201
202
202
        g_atomic_int_set(&write_ptr, priv_write_ptr);
203
        g_atomic_int_set (&write_ptr, priv_write_ptr);
203
        return to_write;
204
        return to_write;
204
}
205
}
205
206
(-)Ardour-6.6.0.orig/libs/pbd/pbd/stateful.h (-3 / +5 lines)
Lines 32-37 Link Here
32
#include "pbd/xml++.h"
32
#include "pbd/xml++.h"
33
#include "pbd/property_basics.h"
33
#include "pbd/property_basics.h"
34
#include "pbd/signals.h"
34
#include "pbd/signals.h"
35
#include "pbd/g_atomic_compat.h"
35
36
36
class XMLNode;
37
class XMLNode;
37
38
Lines 104-110 class LIBPBD_API Stateful { Link Here
104
	virtual void suspend_property_changes ();
105
	virtual void suspend_property_changes ();
105
	virtual void resume_property_changes ();
106
	virtual void resume_property_changes ();
106
107
107
	bool property_changes_suspended() const { return g_atomic_int_get (const_cast<gint*>(&_stateful_frozen)) > 0; }
108
	bool property_changes_suspended() const { return g_atomic_int_get (&_stateful_frozen) > 0; }
108
109
109
  protected:
110
  protected:
110
111
Lines 139-146 class LIBPBD_API Stateful { Link Here
139
  private:
140
  private:
140
	friend struct ForceIDRegeneration;
141
	friend struct ForceIDRegeneration;
141
	static Glib::Threads::Private<bool> _regenerate_xml_or_string_ids;
142
	static Glib::Threads::Private<bool> _regenerate_xml_or_string_ids;
142
	PBD::ID  _id;
143
143
	gint     _stateful_frozen;
144
	PBD::ID           _id;
145
	GATOMIC_QUAL gint _stateful_frozen;
144
146
145
	static void set_regenerate_xml_and_string_ids_in_this_thread (bool yn);
147
	static void set_regenerate_xml_and_string_ids_in_this_thread (bool yn);
146
};
148
};
(-)Ardour-6.6.0.orig/libs/pbd/stateful.cc (-1 / +1 lines)
Lines 54-61 Stateful::Stateful () Link Here
54
	: _extra_xml (0)
54
	: _extra_xml (0)
55
	, _instant_xml (0)
55
	, _instant_xml (0)
56
	, _properties (new OwnedPropertyList)
56
	, _properties (new OwnedPropertyList)
57
	, _stateful_frozen (0)
58
{
57
{
58
	g_atomic_int_set (&_stateful_frozen, 0);
59
}
59
}
60
60
61
Stateful::~Stateful ()
61
Stateful::~Stateful ()
(-)Ardour-6.6.0.orig/libs/waveview/waveview/wave_view_private.h (-4 / +4 lines)
Lines 202-209 public: Link Here
202
	WaveViewDrawRequest ();
202
	WaveViewDrawRequest ();
203
	~WaveViewDrawRequest ();
203
	~WaveViewDrawRequest ();
204
204
205
	bool stopped() const { return (bool) g_atomic_int_get (const_cast<gint*>(&stop)); }
205
	bool stopped() const { return (bool) g_atomic_int_get (&_stop); }
206
	void cancel() { g_atomic_int_set (&stop, 1); }
206
	void cancel() { g_atomic_int_set (&_stop, 1); }
207
	bool finished() { return image->finished(); }
207
	bool finished() { return image->finished(); }
208
208
209
	boost::shared_ptr<WaveViewImage> image;
209
	boost::shared_ptr<WaveViewImage> image;
Lines 213-219 public: Link Here
213
	}
213
	}
214
214
215
private:
215
private:
216
	gint stop; /* intended for atomic access */
216
	GATOMIC_QUAL gint _stop; /* intended for atomic access */
217
};
217
};
218
218
219
class WaveViewCache;
219
class WaveViewCache;
Lines 320-326 private: Link Here
320
320
321
private:
321
private:
322
	Glib::Threads::Thread* _thread;
322
	Glib::Threads::Thread* _thread;
323
	gint _quit;
323
	GATOMIC_QUAL gint _quit;
324
};
324
};
325
325
326
class WaveViewThreads {
326
class WaveViewThreads {
(-)Ardour-6.6.0.orig/libs/waveview/wave_view_private.cc (-3 / +3 lines)
Lines 254-262 WaveViewCache::set_image_cache_threshold Link Here
254
254
255
/*-------------------------------------------------*/
255
/*-------------------------------------------------*/
256
256
257
WaveViewDrawRequest::WaveViewDrawRequest () : stop (0)
257
WaveViewDrawRequest::WaveViewDrawRequest ()
258
{
258
{
259
259
	g_atomic_int_set (&_stop, 0);
260
}
260
}
261
261
262
WaveViewDrawRequest::~WaveViewDrawRequest ()
262
WaveViewDrawRequest::~WaveViewDrawRequest ()
Lines 407-414 WaveViewThreads::stop_threads () Link Here
407
407
408
WaveViewDrawingThread::WaveViewDrawingThread ()
408
WaveViewDrawingThread::WaveViewDrawingThread ()
409
		: _thread(0)
409
		: _thread(0)
410
		, _quit(0)
411
{
410
{
411
	g_atomic_int_set (&_quit, 0);
412
	start ();
412
	start ();
413
}
413
}
414
414
(-)Ardour-6.6.0.orig/wscript (+1 lines)
Lines 1148-1153 def configure(conf): Link Here
1148
        conf.env.append_value('LDFLAGS', '-L/usr/X11R6/lib')
1148
        conf.env.append_value('LDFLAGS', '-L/usr/X11R6/lib')
1149
1149
1150
    autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.28', mandatory=True)
1150
    autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.28', mandatory=True)
1151
    autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB_2_68', atleast_version='2.68', mandatory=False)
1151
    autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD', atleast_version='2.2', mandatory=True)
1152
    autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD', atleast_version='2.2', mandatory=True)
1152
    autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.32.0', mandatory=True)
1153
    autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.32.0', mandatory=True)
1153
    autowaf.check_pkg(conf, 'sndfile', uselib_store='SNDFILE', atleast_version='1.0.18', mandatory=True)
1154
    autowaf.check_pkg(conf, 'sndfile', uselib_store='SNDFILE', atleast_version='1.0.18', mandatory=True)

Return to bug 784383