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
90bdd239
Commit
90bdd239
authored
Nov 02, 2020
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweak speed_scan settings to cover approx. speed range [0.8,1.25].
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
6bcb48b7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
wmget.cc
src/wmget.cc
+8
-5
No files found.
src/wmget.cc
View file @
90bdd239
...
@@ -1139,12 +1139,13 @@ public:
...
@@ -1139,12 +1139,13 @@ public:
}
}
};
};
static
void
static
double
speed_scan
(
const
WavData
&
in_data
)
speed_scan
(
const
WavData
&
in_data
)
{
{
SpeedSync
::
Score
best_s
;
SpeedSync
::
Score
best_s
;
const
int
n_center_steps
=
2
;
/* n_center_steps / n_steps settings: speed approximately 0.8..1.25 */
const
int
n_center_steps
=
10
;
const
int
n_steps
=
10
;
const
int
n_steps
=
10
;
const
double
step
=
1.001
;
const
double
step
=
1.001
;
for
(
int
c
=
-
n_center_steps
;
c
<=
n_center_steps
;
c
++
)
for
(
int
c
=
-
n_center_steps
;
c
<=
n_center_steps
;
c
++
)
...
@@ -1157,20 +1158,22 @@ speed_scan (const WavData& in_data)
...
@@ -1157,20 +1158,22 @@ speed_scan (const WavData& in_data)
best_s
=
s
;
best_s
=
s
;
}
}
printf
(
"## %f %f
\n
"
,
best_s
.
speed
,
best_s
.
quality
);
printf
(
"## %f %f
\n
"
,
best_s
.
speed
,
best_s
.
quality
);
return
best_s
.
speed
;
}
}
static
int
static
int
decode_and_report
(
const
WavData
&
in_data
,
const
string
&
orig_pattern
)
decode_and_report
(
const
WavData
&
in_data
,
const
string
&
orig_pattern
)
{
{
speed_scan
(
in_data
);
return
0
;
WavData
wav_data
;
WavData
wav_data
;
if
(
Params
::
detect_speed
)
if
(
Params
::
detect_speed
)
{
{
double
speed
;
double
speed
;
/* first pass: find approximation for speed */
/* first pass: find approximation for speed */
speed
=
detect_speed
(
in_data
,
1.0
,
1.001
,
/* steps */
200
,
/* seconds */
15
);
speed
=
speed_scan
(
in_data
);
/* SLOW */
// speed = detect_speed (in_data, 1.0, 1.001, /* steps */ 200, /* seconds */ 15);
/* second pass: refine */
/* second pass: refine */
speed
=
detect_speed
(
in_data
,
speed
,
1.00005
,
/* steps */
20
,
/* seconds */
50
);
speed
=
detect_speed
(
in_data
,
speed
,
1.00005
,
/* steps */
20
,
/* seconds */
50
);
...
...
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