WIP: track creation and deletion both in frontend and backend.

This commit is contained in:
2025-07-28 01:03:40 +02:00
parent ecadfb7033
commit cb38a509b5
15 changed files with 192 additions and 49 deletions

33
Source/Track.cs Normal file
View File

@@ -0,0 +1,33 @@
using System.Collections.Generic;
using System.Linq;
namespace AudioEditor;
public class Track
{
public int Idx { get; private set; }
public string Name { get; private set; }
public Track(int idx, string name)
{
Idx = idx;
Name = name;
}
public Track(int idx, string name, IEnumerable<Clip> clips)
{
Idx = idx;
Name = name;
_clips = clips.ToList();
}
public bool TryAddClip(Clip clip)
{
_clips.Add(clip);
return false;
}
public Track Duplicate() => new(Idx, Name, _clips);
private List<Clip> _clips = new();
}