Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
audiowmark
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
audiowmark
Commits
e0f17fed
Commit
e0f17fed
authored
Jan 05, 2022
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid speed detection for ultra short input files to avoid errors.
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
69400419
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
wmspeed.cc
src/wmspeed.cc
+8
-0
No files found.
src/wmspeed.cc
View file @
e0f17fed
...
...
@@ -497,6 +497,14 @@ get_best_clip_location (const WavData& in_data, double seconds, int candidates)
double
detect_speed
(
const
WavData
&
in_data
,
bool
print_results
)
{
/* typically even for high strength we need at least a few seconds of audio
* in in_data for successful speed detection, but our algorithm won't work at
* all for very short input files
*/
double
in_seconds
=
double
(
in_data
.
n_frames
())
/
in_data
.
sample_rate
();
if
(
in_seconds
<
0.25
)
return
1
;
ThreadPool
thread_pool
;
/* first pass: find approximation for speed */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment