Skip to content

Commit

Permalink
add: []bytes support in loader Load
Browse files Browse the repository at this point in the history
  • Loading branch information
sreeram-narayanan committed Oct 4, 2023
1 parent 77719a3 commit 6ba80eb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ func (l *Loader) Load(src interface{}) (*AudioSegment, error) {
return nil, err
}
buf = result
case []byte:
buf = r
default:
return nil, fmt.Errorf("expected `io.Reader` or file path to original audio")
}
Expand Down

0 comments on commit 6ba80eb

Please sign in to comment.