Skip to content
Snippets Groups Projects
Commit 6b1b34c2 authored by ale's avatar ale
Browse files

prober: Run sox with "-t mp3" in all cases

parent b9e5f9b4
Branches
No related tags found
No related merge requests found
......@@ -22,7 +22,9 @@ type decoder struct {
}
func newDecoder(r io.Reader) (*decoder, error) {
cmd := exec.Command("sox", "-", "-r", analysisSampleRate, "-c", analysisChannels, "-b", "64", "-e", "float", "--endian", "little", "-t", "raw", "-")
// Here we use '-t mp3' for all formats, as sox will do the
// right thing anyway (autodetect) for ogg-format streams.
cmd := exec.Command("sox", "-t", "mp3", "-", "-r", analysisSampleRate, "-c", analysisChannels, "-b", "64", "-e", "float", "--endian", "little", "-t", "raw", "-")
cmd.Stdin = r
cmd.Stderr = os.Stderr
stdout, err := cmd.StdoutPipe()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment