Skip to content

Commit c35a1c8

Browse files
committed
[feat]: discardable results
1 parent 2e8578f commit c35a1c8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/ScriptToolkit/FileExtension.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,22 +96,22 @@ public extension File {
9696
////////////////////////////////////////////////////////////////////////////////
9797
// MARK: - Audio Processing
9898

99-
public func slowDownAudio(newName: String, percent: Float) throws -> File {
99+
@discardableResult public func slowDownAudio(newName: String, percent: Float) throws -> File {
100100
run("/usr/local/bin/sox", path, newName, "tempo", "-s", Int(percent))
101101
return try File(path: newName)
102102
}
103103

104-
public func convertToWav(newName: String) throws -> File {
104+
@discardableResult public func convertToWav(newName: String) throws -> File {
105105
run("ffmpeg", "-i", path, "-sample_rate 44100", newName.deletingPathExtension + ".wav")
106106
return try File(path: newName)
107107
}
108108

109-
public func convertToM4A(newName: String) throws -> File {
109+
@discardableResult public func convertToM4A(newName: String) throws -> File {
110110
run("ffmpeg", "-i", path, "-sample_rate 44100", newName.deletingPathExtension + ".m4a")
111111
return try File(path: newName)
112112
}
113113

114-
public func addSilence(newName: String) throws -> File {
114+
@discardableResult public func addSilence(newName: String) throws -> File {
115115
run("sox", "/Users/dan/Documents/[Development]/[Projects]/SwiftScripts/practise/silence.wav", path, newName)
116116
return try File(path: newName)
117117
}

0 commit comments

Comments
 (0)