- if ((prop = node.property ("diskstream-id")) == 0) {
-
- /* some old sessions use the diskstream name rather than the ID */
-
- if ((prop = node.property ("diskstream")) == 0) {
- fatal << _("programming error: MidiTrack given state without diskstream!") << endmsg;
- /*NOTREACHED*/
- return -1;
- }
-
- if (use_diskstream (prop->value())) {
- return -1;
- }
-
- } else {
-
- PBD::ID id (prop->value());
- PBD::ID zero ("0");
-
- /* this wierd hack is used when creating tracks from a template. there isn't
- a particularly good time to interpose between setting the first part of
- the track state (notably Route::set_state() and the track mode), and the
- second part (diskstream stuff). So, we have a special ID for the diskstream
- that means "you should create a new diskstream here, not look for
- an old one.
- */
-
- if (id == zero) {
- use_new_diskstream ();
- } else if (use_diskstream (id)) {
- return -1;
- }
- }
-