Lines 1-368
Link Here
|
1 |
--- libs/ardour/session.cc.orig |
|
|
2 |
+++ libs/ardour/session.cc |
3 |
@@ -79,7 +79,6 @@ |
4 |
using namespace std; |
5 |
using namespace ARDOUR; |
6 |
using namespace PBD; |
7 |
-using boost::shared_ptr; |
8 |
|
9 |
#ifdef __x86_64__ |
10 |
static const int CPU_CACHE_ALIGN = 64; |
11 |
@@ -399,14 +398,14 @@ Session::Session (AudioEngine &eng, |
12 |
int control_id = 1; |
13 |
|
14 |
if (control_out_channels) { |
15 |
- shared_ptr<Route> r (new Route (*this, _("monitor"), -1, control_out_channels, -1, control_out_channels, Route::ControlOut)); |
16 |
+ boost::shared_ptr<Route> r (new Route (*this, _("monitor"), -1, control_out_channels, -1, control_out_channels, Route::ControlOut)); |
17 |
r->set_remote_control_id (control_id++); |
18 |
|
19 |
rl.push_back (r); |
20 |
} |
21 |
|
22 |
if (master_out_channels) { |
23 |
- shared_ptr<Route> r (new Route (*this, _("master"), -1, master_out_channels, -1, master_out_channels, Route::MasterOut)); |
24 |
+ boost::shared_ptr<Route> r (new Route (*this, _("master"), -1, master_out_channels, -1, master_out_channels, Route::MasterOut)); |
25 |
r->set_remote_control_id (control_id); |
26 |
|
27 |
rl.push_back (r); |
28 |
@@ -984,8 +983,8 @@ Session::hookup_io () |
29 |
boost::shared_ptr<Session::RouteList> |
30 |
Session::get_routes_with_regions_at (nframes64_t const p) const |
31 |
{ |
32 |
- shared_ptr<RouteList> r = routes.reader (); |
33 |
- shared_ptr<RouteList> rl (new RouteList); |
34 |
+ boost::shared_ptr<RouteList> r = routes.reader (); |
35 |
+ boost::shared_ptr<RouteList> rl (new RouteList); |
36 |
|
37 |
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { |
38 |
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i); |
39 |
@@ -1590,9 +1589,9 @@ struct RouteSorter { |
40 |
}; |
41 |
|
42 |
static void |
43 |
-trace_terminal (shared_ptr<Route> r1, shared_ptr<Route> rbase) |
44 |
+trace_terminal (boost::shared_ptr<Route> r1, boost::shared_ptr<Route> rbase) |
45 |
{ |
46 |
- shared_ptr<Route> r2; |
47 |
+ boost::shared_ptr<Route> r2; |
48 |
|
49 |
if ((r1->fed_by.find (rbase) != r1->fed_by.end()) && (rbase->fed_by.find (r1) != rbase->fed_by.end())) { |
50 |
info << string_compose(_("feedback loop setup between %1 and %2"), r1->name(), rbase->name()) << endmsg; |
51 |
@@ -1601,13 +1600,13 @@ trace_terminal (shared_ptr<Route> r1, sh |
52 |
|
53 |
/* make a copy of the existing list of routes that feed r1 */ |
54 |
|
55 |
- set<shared_ptr<Route> > existing = r1->fed_by; |
56 |
+ set<boost::shared_ptr<Route> > existing = r1->fed_by; |
57 |
|
58 |
/* for each route that feeds r1, recurse, marking it as feeding |
59 |
rbase as well. |
60 |
*/ |
61 |
|
62 |
- for (set<shared_ptr<Route> >::iterator i = existing.begin(); i != existing.end(); ++i) { |
63 |
+ for (set<boost::shared_ptr<Route> >::iterator i = existing.begin(); i != existing.end(); ++i) { |
64 |
r2 =* i; |
65 |
|
66 |
/* r2 is a route that feeds r1 which somehow feeds base. mark |
67 |
@@ -1651,14 +1650,14 @@ Session::resort_routes () |
68 |
{ |
69 |
|
70 |
RCUWriter<RouteList> writer (routes); |
71 |
- shared_ptr<RouteList> r = writer.get_copy (); |
72 |
+ boost::shared_ptr<RouteList> r = writer.get_copy (); |
73 |
resort_routes_using (r); |
74 |
/* writer goes out of scope and forces update */ |
75 |
} |
76 |
} |
77 |
|
78 |
void |
79 |
-Session::resort_routes_using (shared_ptr<RouteList> r) |
80 |
+Session::resort_routes_using (boost::shared_ptr<RouteList> r) |
81 |
{ |
82 |
RouteList::iterator i, j; |
83 |
|
84 |
@@ -1723,7 +1722,7 @@ Session::new_audio_track (int input_chan |
85 |
/* count existing audio tracks */ |
86 |
|
87 |
{ |
88 |
- shared_ptr<RouteList> r = routes.reader (); |
89 |
+ boost::shared_ptr<RouteList> r = routes.reader (); |
90 |
|
91 |
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { |
92 |
if (dynamic_cast<AudioTrack*>((*i).get()) != 0) { |
93 |
@@ -1776,7 +1775,7 @@ Session::new_audio_track (int input_chan |
94 |
nphysical_out = 0; |
95 |
} |
96 |
|
97 |
- shared_ptr<AudioTrack> track; |
98 |
+ boost::shared_ptr<AudioTrack> track; |
99 |
|
100 |
try { |
101 |
track = boost::shared_ptr<AudioTrack>((new AudioTrack (*this, track_name, Route::Flag (0), mode))); |
102 |
@@ -1884,7 +1883,7 @@ Session::set_remote_control_ids () |
103 |
{ |
104 |
RemoteModel m = Config->get_remote_model(); |
105 |
|
106 |
- shared_ptr<RouteList> r = routes.reader (); |
107 |
+ boost::shared_ptr<RouteList> r = routes.reader (); |
108 |
|
109 |
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { |
110 |
if ( MixerOrdered == m) { |
111 |
@@ -1913,7 +1912,7 @@ Session::new_audio_route (int input_chan |
112 |
/* count existing audio busses */ |
113 |
|
114 |
{ |
115 |
- shared_ptr<RouteList> r = routes.reader (); |
116 |
+ boost::shared_ptr<RouteList> r = routes.reader (); |
117 |
|
118 |
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { |
119 |
if (dynamic_cast<AudioTrack*>((*i).get()) == 0) { |
120 |
@@ -1945,7 +1944,7 @@ Session::new_audio_route (int input_chan |
121 |
} while (bus_id < (UINT_MAX-1)); |
122 |
|
123 |
try { |
124 |
- shared_ptr<Route> bus (new Route (*this, bus_name, -1, -1, -1, -1, Route::Flag(0), DataType::AUDIO)); |
125 |
+ boost::shared_ptr<Route> bus (new Route (*this, bus_name, -1, -1, -1, -1, Route::Flag(0), DataType::AUDIO)); |
126 |
|
127 |
if (bus->ensure_io (input_channels, output_channels, false, this)) { |
128 |
error << string_compose (_("cannot configure %1 in/%2 out configuration for new audio track"), |
129 |
@@ -2060,7 +2059,7 @@ Session::new_route_from_template (uint32 |
130 |
Track::zero_diskstream_id_in_xml (node_copy); |
131 |
|
132 |
try { |
133 |
- shared_ptr<Route> route (XMLRouteFactory (node_copy)); |
134 |
+ boost::shared_ptr<Route> route (XMLRouteFactory (node_copy)); |
135 |
|
136 |
if (route == 0) { |
137 |
error << _("Session: cannot create track/bus from template description") << endmsg; |
138 |
@@ -2107,7 +2106,7 @@ boost::shared_ptr<Route> |
139 |
Session::new_video_track (string name) |
140 |
{ |
141 |
uint32_t control_id = ntracks() + nbusses() + 1; |
142 |
- shared_ptr<Route> new_route ( |
143 |
+ boost::shared_ptr<Route> new_route ( |
144 |
new Route ( *this, name, -1, -1, -1, -1, Route::Flag(0), ARDOUR::DataType::NIL)); |
145 |
new_route->set_remote_control_id (control_id); |
146 |
|
147 |
@@ -2115,7 +2114,7 @@ Session::new_video_track (string name) |
148 |
rl.push_back (new_route); |
149 |
{ |
150 |
RCUWriter<RouteList> writer (routes); |
151 |
- shared_ptr<RouteList> r = writer.get_copy (); |
152 |
+ boost::shared_ptr<RouteList> r = writer.get_copy (); |
153 |
r->insert (r->end(), rl.begin(), rl.end()); |
154 |
resort_routes_using (r); |
155 |
} |
156 |
@@ -2127,7 +2126,7 @@ Session::add_routes (RouteList& new_rout |
157 |
{ |
158 |
{ |
159 |
RCUWriter<RouteList> writer (routes); |
160 |
- shared_ptr<RouteList> r = writer.get_copy (); |
161 |
+ boost::shared_ptr<RouteList> r = writer.get_copy (); |
162 |
r->insert (r->end(), new_routes.begin(), new_routes.end()); |
163 |
resort_routes_using (r); |
164 |
} |
165 |
@@ -2150,7 +2149,7 @@ Session::add_routes (RouteList& new_rout |
166 |
} |
167 |
} |
168 |
|
169 |
- if (_control_out && IO::connecting_legal) { |
170 |
+ if (_control_out && IO::connecting_is_legal()) { |
171 |
|
172 |
vector<string> cports; |
173 |
uint32_t ni = _control_out->n_inputs(); |
174 |
@@ -2198,14 +2197,14 @@ Session::add_diskstream (boost::shared_p |
175 |
} |
176 |
|
177 |
void |
178 |
-Session::remove_route (shared_ptr<Route> route) |
179 |
+Session::remove_route (boost::shared_ptr<Route> route) |
180 |
{ |
181 |
//clear solos before removing the route |
182 |
route->set_solo ( false, this); |
183 |
|
184 |
{ |
185 |
RCUWriter<RouteList> writer (routes); |
186 |
- shared_ptr<RouteList> rs = writer.get_copy (); |
187 |
+ boost::shared_ptr<RouteList> rs = writer.get_copy (); |
188 |
|
189 |
rs->remove (route); |
190 |
|
191 |
@@ -2215,11 +2214,11 @@ Session::remove_route (shared_ptr<Route> |
192 |
*/ |
193 |
|
194 |
if (route == _master_out) { |
195 |
- _master_out = shared_ptr<Route> (); |
196 |
+ _master_out = boost::shared_ptr<Route> (); |
197 |
} |
198 |
|
199 |
if (route == _control_out) { |
200 |
- _control_out = shared_ptr<Route> (); |
201 |
+ _control_out = boost::shared_ptr<Route> (); |
202 |
|
203 |
/* cancel control outs for all routes */ |
204 |
|
205 |
@@ -2308,7 +2307,7 @@ Session::route_solo_changed (void* src, |
206 |
|
207 |
is_track = (boost::dynamic_pointer_cast<AudioTrack>(route) != 0); |
208 |
|
209 |
- shared_ptr<RouteList> r = routes.reader (); |
210 |
+ boost::shared_ptr<RouteList> r = routes.reader (); |
211 |
|
212 |
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { |
213 |
|
214 |
@@ -2404,7 +2403,7 @@ Session::update_route_solo_state () |
215 |
the solo mute setting of each track. |
216 |
*/ |
217 |
|
218 |
- shared_ptr<RouteList> r = routes.reader (); |
219 |
+ boost::shared_ptr<RouteList> r = routes.reader (); |
220 |
|
221 |
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { |
222 |
if ((*i)->soloed()) { |
223 |
@@ -2446,7 +2445,7 @@ Session::update_route_solo_state () |
224 |
void |
225 |
Session::modify_solo_mute (bool is_track, bool mute) |
226 |
{ |
227 |
- shared_ptr<RouteList> r = routes.reader (); |
228 |
+ boost::shared_ptr<RouteList> r = routes.reader (); |
229 |
|
230 |
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { |
231 |
|
232 |
@@ -2511,7 +2510,7 @@ Session::catch_up_on_solo_mute_override |
233 |
/* this is called whenever the param solo-mute-override is |
234 |
changed. |
235 |
*/ |
236 |
- shared_ptr<RouteList> r = routes.reader (); |
237 |
+ boost::shared_ptr<RouteList> r = routes.reader (); |
238 |
|
239 |
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { |
240 |
(*i)->catch_up_on_solo_mute_override (); |
241 |
@@ -2521,7 +2520,7 @@ Session::catch_up_on_solo_mute_override |
242 |
bool |
243 |
Session::io_name_is_legal (const std::string& name) |
244 |
{ |
245 |
- shared_ptr<RouteList> r = routes.reader (); |
246 |
+ boost::shared_ptr<RouteList> r = routes.reader (); |
247 |
|
248 |
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { |
249 |
if ((*i)->name() == name) { |
250 |
@@ -2536,10 +2535,10 @@ Session::io_name_is_legal (const std::st |
251 |
return true; |
252 |
} |
253 |
|
254 |
-shared_ptr<Route> |
255 |
+boost::shared_ptr<Route> |
256 |
Session::route_by_name (const std::string& name) |
257 |
{ |
258 |
- shared_ptr<RouteList> r = routes.reader (); |
259 |
+ boost::shared_ptr<RouteList> r = routes.reader (); |
260 |
|
261 |
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { |
262 |
if ((*i)->name() == name) { |
263 |
@@ -2547,13 +2546,13 @@ Session::route_by_name (const std::strin |
264 |
} |
265 |
} |
266 |
|
267 |
- return shared_ptr<Route> ((Route*) 0); |
268 |
+ return boost::shared_ptr<Route> ((Route*) 0); |
269 |
} |
270 |
|
271 |
-shared_ptr<Route> |
272 |
+boost::shared_ptr<Route> |
273 |
Session::route_by_id (PBD::ID id) |
274 |
{ |
275 |
- shared_ptr<RouteList> r = routes.reader (); |
276 |
+ boost::shared_ptr<RouteList> r = routes.reader (); |
277 |
|
278 |
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { |
279 |
if ((*i)->id() == id) { |
280 |
@@ -2561,13 +2560,13 @@ Session::route_by_id (PBD::ID id) |
281 |
} |
282 |
} |
283 |
|
284 |
- return shared_ptr<Route> ((Route*) 0); |
285 |
+ return boost::shared_ptr<Route> ((Route*) 0); |
286 |
} |
287 |
|
288 |
-shared_ptr<Route> |
289 |
+boost::shared_ptr<Route> |
290 |
Session::route_by_remote_id (uint32_t id) |
291 |
{ |
292 |
- shared_ptr<RouteList> r = routes.reader (); |
293 |
+ boost::shared_ptr<RouteList> r = routes.reader (); |
294 |
|
295 |
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { |
296 |
if ((*i)->remote_control_id() == id) { |
297 |
@@ -2575,7 +2574,7 @@ Session::route_by_remote_id (uint32_t id |
298 |
} |
299 |
} |
300 |
|
301 |
- return shared_ptr<Route> ((Route*) 0); |
302 |
+ return boost::shared_ptr<Route> ((Route*) 0); |
303 |
} |
304 |
|
305 |
void |
306 |
@@ -3595,7 +3594,7 @@ Session::is_auditioning () const |
307 |
void |
308 |
Session::set_all_solo (bool yn) |
309 |
{ |
310 |
- shared_ptr<RouteList> r = routes.reader (); |
311 |
+ boost::shared_ptr<RouteList> r = routes.reader (); |
312 |
|
313 |
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { |
314 |
if (!(*i)->hidden()) { |
315 |
@@ -3609,7 +3608,7 @@ Session::set_all_solo (bool yn) |
316 |
void |
317 |
Session::set_all_mute (bool yn) |
318 |
{ |
319 |
- shared_ptr<RouteList> r = routes.reader (); |
320 |
+ boost::shared_ptr<RouteList> r = routes.reader (); |
321 |
|
322 |
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { |
323 |
if (!(*i)->hidden()) { |
324 |
@@ -3680,7 +3679,7 @@ Session::record_enable_all () |
325 |
void |
326 |
Session::record_enable_change_all (bool yn) |
327 |
{ |
328 |
- shared_ptr<RouteList> r = routes.reader (); |
329 |
+ boost::shared_ptr<RouteList> r = routes.reader (); |
330 |
|
331 |
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { |
332 |
AudioTrack* at; |
333 |
@@ -4071,7 +4070,7 @@ Session::reset_native_file_format () |
334 |
bool |
335 |
Session::route_name_unique (string n) const |
336 |
{ |
337 |
- shared_ptr<RouteList> r = routes.reader (); |
338 |
+ boost::shared_ptr<RouteList> r = routes.reader (); |
339 |
|
340 |
for (RouteList::const_iterator i = r->begin(); i != r->end(); ++i) { |
341 |
if ((*i)->name() == n) { |
342 |
@@ -4117,7 +4116,7 @@ Session::allocate_pan_automation_buffers |
343 |
int |
344 |
Session::freeze (InterThreadInfo& itt) |
345 |
{ |
346 |
- shared_ptr<RouteList> r = routes.reader (); |
347 |
+ boost::shared_ptr<RouteList> r = routes.reader (); |
348 |
|
349 |
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { |
350 |
|
351 |
@@ -4355,7 +4354,7 @@ uint32_t |
352 |
Session::ntracks () const |
353 |
{ |
354 |
uint32_t n = 0; |
355 |
- shared_ptr<RouteList> r = routes.reader (); |
356 |
+ boost::shared_ptr<RouteList> r = routes.reader (); |
357 |
|
358 |
for (RouteList::const_iterator i = r->begin(); i != r->end(); ++i) { |
359 |
if (dynamic_cast<AudioTrack*> ((*i).get())) { |
360 |
@@ -4370,7 +4369,7 @@ uint32_t |
361 |
Session::nbusses () const |
362 |
{ |
363 |
uint32_t n = 0; |
364 |
- shared_ptr<RouteList> r = routes.reader (); |
365 |
+ boost::shared_ptr<RouteList> r = routes.reader (); |
366 |
|
367 |
for (RouteList::const_iterator i = r->begin(); i != r->end(); ++i) { |
368 |
if (dynamic_cast<AudioTrack*> ((*i).get()) == 0) { |