@@ -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