Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
autoradio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ale
autoradio
Commits
6b1b34c2
Commit
6b1b34c2
authored
4 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
prober: Run sox with "-t mp3" in all cases
parent
b9e5f9b4
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
prober/decoder.go
+3
-1
3 additions, 1 deletion
prober/decoder.go
with
3 additions
and
1 deletion
prober/decoder.go
+
3
−
1
View file @
6b1b34c2
...
...
@@ -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
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment