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);
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);
}