Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
07b7c2a2
Commit
07b7c2a2
authored
Mar 24, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/sine: use standard options parsing.
parent
3ac77f67
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
asrc_sine.c
libavfilter/asrc_sine.c
+3
-7
No files found.
libavfilter/asrc_sine.c
View file @
07b7c2a2
...
...
@@ -123,14 +123,7 @@ static void make_sin_table(int16_t *sin)
static
av_cold
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
)
{
SineContext
*
sine
=
ctx
->
priv
;
static
const
char
*
shorthand
[]
=
{
"frequency"
,
"beep_factor"
,
NULL
};
int
ret
;
sine
->
class
=
&
sine_class
;
av_opt_set_defaults
(
sine
);
if
((
ret
=
av_opt_set_from_string
(
sine
,
args
,
shorthand
,
"="
,
":"
))
<
0
)
return
ret
;
if
(
!
(
sine
->
sin
=
av_malloc
(
sizeof
(
*
sine
->
sin
)
<<
LOG_PERIOD
)))
return
AVERROR
(
ENOMEM
);
sine
->
dphi
=
ldexp
(
sine
->
frequency
,
32
)
/
sine
->
sample_rate
+
0
.
5
;
...
...
@@ -217,6 +210,8 @@ static const AVFilterPad sine_outputs[] = {
{
NULL
}
};
static
const
char
*
const
shorthand
[]
=
{
"frequency"
,
"beep_factor"
,
NULL
};
AVFilter
avfilter_asrc_sine
=
{
.
name
=
"sine"
,
.
description
=
NULL_IF_CONFIG_SMALL
(
"Generate sine wave audio signal."
),
...
...
@@ -227,4 +222,5 @@ AVFilter avfilter_asrc_sine = {
.
inputs
=
NULL
,
.
outputs
=
sine_outputs
,
.
priv_class
=
&
sine_class
,
.
shorthand
=
shorthand
,
};
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