mirror of
https://github.com/cgzirim/seek-tune.git
synced 2025-12-16 16:34:21 +00:00
fix: delete non .wav file after conversion.
This commit is contained in:
parent
e51b06c159
commit
29867c8b34
1 changed files with 4 additions and 0 deletions
|
|
@ -21,6 +21,10 @@ func ConvertToWAV(inputFilePath string, channels int) (wavFilePath string, err e
|
|||
}
|
||||
|
||||
fileExt := filepath.Ext(inputFilePath)
|
||||
if fileExt != ".wav" {
|
||||
defer os.Remove(inputFilePath)
|
||||
}
|
||||
|
||||
outputFile := strings.TrimSuffix(inputFilePath, fileExt) + ".wav"
|
||||
|
||||
// Output file may already exists. If it does FFmpeg will fail as
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue