-// for (int i = 0; i < tracks.children.length(); ++i) {
-// TrackTransport tt = tracks.children.nth_data(i) as TrackTransport;
-// if (null != tt) {
-// if (tt.get_active_state()) {
-// stdout.printf("Track %s active and has been added\n", i.to_string());
-// //track.bin.set_start_time((Gst.ClockTime)(Time.Nanoseconds.SECOND * idx));
-// mixer.add_track(tt.track_bin);
-// }
-// }
-// tt = null;
-// }
- while (idx < project.tracks.length()) {
+ stdout.printf("Widgets in HBox %s\n", tracks.children.length().to_string());
+ var children = tracks.get_children();
+ foreach (var child in children) {
+ TrackTransport tt = child as TrackTransport;
+ if (null != tt && tt.get_active_state()) {
+ stdout.printf("Track is active and has been added\n");
+ mixer.add_track(tt.track_bin);
+ }
+ }
+ //for (int i = 0; i < tracks.children.length(); ++i) {
+ //Object tt = tracks.children.nth_data(i);
+ //stdout.printf("Type %s\n",tt.get_type().name());
+ //if (null != tt) {
+ //if (tt.track_bin.IsActive) {
+ //stdout.printf("Track %s active and has been added\n", i.to_string());
+ //track.bin.set_start_time((Gst.ClockTime)(Time.Nanoseconds.SECOND * idx));
+ //mixer.add_track(tt.track_bin);
+ //}
+ //}
+ //tt = null;
+ //}
+ /*while (idx < project.tracks.length()) {