- for (int i = 0; i < NUM_OUTLETS; i++)
- {
- SCM type = (i == CONTEXT_NULL) ? ly_symbol2scm ("Devnull") : ly_symbol2scm ("Voice");
- /* find context below c: otherwise we may create new staff for each voice */
- c = c->find_create_context (type, outlet_names_[i], SCM_EOL);
- handles_[i].set_context (c);
- if (c->is_alias (ly_symbol2scm ("Voice")))
- c->event_source ()->add_listener (GET_LISTENER (set_busy), ly_symbol2scm ("music-event"));
- }
+ SCM_UNDEFINED);
+
+ Context *tr
+ = get_outlet ()->find_create_context (ly_symbol2scm ("Voice"),
+ "shared", props);
+
+ shared_.set_context (tr);
+
+ /*
+ If we don't, we get a new staff for every Voice.
+ */
+ set_context (tr);
+
+ Context *solo_tr
+ = get_outlet ()->find_create_context (ly_symbol2scm ("Voice"),
+ "solo", props);
+
+ solo_.set_context (solo_tr);
+
+ Context *null
+ = get_outlet ()->find_create_context (ly_symbol2scm ("Devnull"),
+ "", SCM_EOL);
+
+ if (!null)
+ programming_error ("no Devnull found");
+
+ null_.set_context (null);
+
+ Context *one = tr->find_create_context (ly_symbol2scm ("Voice"),
+ "one", props);
+
+ one_.set_context (one);