Skip to content

Commit

Permalink
Added Sendable and Identifiable conformance to DAW-agnostic types…
Browse files Browse the repository at this point in the history
… where appropriate
  • Loading branch information
orchetect committed Sep 22, 2024
1 parent 9e0d2d6 commit 1df8e7d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ extension DAWMarker.Storage {
}
}

extension DAWMarker.Storage.Value: Identifiable {
public var id: Self { self }
}

extension DAWMarker.Storage.Value: Sendable { }

extension DAWMarker.Storage.Value: Codable {
enum CodingKeys: CodingKey {
case realTime
Expand Down
2 changes: 2 additions & 0 deletions Sources/DAWFileKit/DAW Agnostic Types/DAWMarker Storage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ extension DAWMarker {
}
}
}

extension DAWMarker.Storage: Sendable { }
2 changes: 2 additions & 0 deletions Sources/DAWFileKit/DAW Agnostic Types/DAWMarker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ public struct DAWMarker: Codable {
self.comment = comment
}
}

extension DAWMarker: Sendable { }
2 changes: 2 additions & 0 deletions Sources/DAWFileKit/DAW Agnostic Types/DAWMarkerTrack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public struct DAWMarkerTrack: Codable {
}
}

extension DAWMarkerTrack: Sendable { }

// MARK: - Collection Methods

extension Collection where Element == DAWMarkerTrack {
Expand Down
6 changes: 6 additions & 0 deletions Sources/DAWFileKit/DAW Agnostic Types/DAWTrackType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ public enum DAWTrackType: Equatable, Hashable, Codable {
/// A track used in a timeline. Usually reorder-able, deletable, and duplicatable.
case track
}

extension DAWTrackType: Identifiable {
public var id: Self { self }
}

extension DAWTrackType: Sendable { }

0 comments on commit 1df8e7d

Please sign in to comment.