RecordPipeline recordpipeline;
PlayerTransport player;
MixerBin mixer;
- uint track_counter;
+ uint track_counter { get { return (null != tracks) ? tracks.get_children().length() : 0; }}
bool recording;
bool playing;
bool encoding;
project = SettingsStructures.ProjectSettings();
recording = false;
playing = false;
- track_counter = 0;
window = new Hildon.StackableWindow();
window.destroy.connect(Gtk.main_quit);
window.delete_event.connect(on_delete_event);
keep_screen_on();
if (0 != screen_timer_id) Source.remove(screen_timer_id);
screen_timer_id = Timeout.add ((uint)Time.Milliseconds.SECOND * 20, keep_screen_on);
- 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 idx = ((int)project.tracks.length()) - 1; idx > -1; --idx) {
project.tracks.delete_link(project.tracks.nth(idx));
}
+ player.position_duration_callback(0, 0);
}
private void remove_track_interactive(TrackTransport tt) {
string message = "";
private void remove_track(TrackTransport tt) {
project.tracks.remove(tt.track);
tracks.remove(tt);
+ // rebuild project.tracks
+ for (int idx = (int)project.tracks.length(); idx >= 0; --idx) {
+ project.tracks.remove_link(project.tracks.nth(idx));
+ }
+ foreach (var child in tracks.get_children()) {
+ project.tracks.append(((TrackTransport)child).track);
+ }
+ project_dirty = true;
tt = null;
}
private void save_project() {
+ // rebuild track settings
+ for (int idx = (int)project.tracks.length(); idx >= 0; --idx) {
+ project.tracks.remove_link(project.tracks.nth(idx));
+ }
+ foreach (var child in tracks.get_children()) {
+ project.tracks.append(((TrackTransport)child).track);
+ }
if (0 < project.location.length) {
save_project_settings(project.location);
}