.audio resampler
This commit is contained in:
@@ -1157,6 +1157,21 @@ func (a *App) ConvertAudio(req ConvertAudioRequest) ([]backend.ConvertAudioResul
|
||||
return backend.ConvertAudio(backendReq)
|
||||
}
|
||||
|
||||
type ResampleAudioRequest struct {
|
||||
InputFiles []string `json:"input_files"`
|
||||
SampleRate string `json:"sample_rate"`
|
||||
BitDepth string `json:"bit_depth"`
|
||||
}
|
||||
|
||||
func (a *App) ResampleAudio(req ResampleAudioRequest) ([]backend.ResampleResult, error) {
|
||||
backendReq := backend.ResampleRequest{
|
||||
InputFiles: req.InputFiles,
|
||||
SampleRate: req.SampleRate,
|
||||
BitDepth: req.BitDepth,
|
||||
}
|
||||
return backend.ResampleAudio(backendReq)
|
||||
}
|
||||
|
||||
func (a *App) SelectAudioFiles() ([]string, error) {
|
||||
files, err := backend.SelectMultipleFiles(a.ctx)
|
||||
if err != nil {
|
||||
@@ -1165,6 +1180,10 @@ func (a *App) SelectAudioFiles() ([]string, error) {
|
||||
return files, nil
|
||||
}
|
||||
|
||||
func (a *App) GetFlacInfoBatch(paths []string) []backend.FlacInfo {
|
||||
return backend.GetFlacInfoBatch(paths)
|
||||
}
|
||||
|
||||
func (a *App) GetFileSizes(files []string) map[string]int64 {
|
||||
return backend.GetFileSizes(files)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user