Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
fd18a305
Commit
fd18a305
authored
Apr 16, 2014
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audiobargraph_a: split function
parent
ec3ee968
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
15 deletions
+19
-15
modules/audio_filter/audiobargraph_a.c
modules/audio_filter/audiobargraph_a.c
+19
-15
No files found.
modules/audio_filter/audiobargraph_a.c
View file @
fd18a305
...
...
@@ -139,6 +139,24 @@ static int Open( vlc_object_t *p_this )
return
VLC_SUCCESS
;
}
static
void
SendValues
(
filter_t
*
p_filter
,
float
*
value
,
int
nbChannels
)
{
char
message
[
256
];
size_t
len
=
0
;
for
(
int
i
=
0
;
i
<
nbChannels
;
i
++
)
{
if
(
len
>=
sizeof
(
message
))
break
;
len
+=
snprintf
(
message
+
len
,
sizeof
(
message
),
"%f:"
,
value
[
i
]);
}
message
[
len
-
1
]
=
'\0'
;
msg_Dbg
(
p_filter
,
"values: %s"
,
message
);
var_SetString
(
p_filter
->
p_libvlc
,
"audiobargraph_v-i_values"
,
message
);
}
/*****************************************************************************
* DoWork: treat an audio buffer
****************************************************************************/
...
...
@@ -210,22 +228,8 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
}
if
(
p_sys
->
bargraph
&&
nbChannels
>
0
&&
p_sys
->
counter
++
>
p_sys
->
bargraph_repetition
)
{
/* 6 - send the message with the values for the BarGraph */
SendValues
(
p_filter
,
i_value
,
nbChannels
);
p_sys
->
counter
=
0
;
char
message
[
256
];
size_t
len
=
0
;
for
(
int
i
=
0
;
i
<
nbChannels
;
i
++
)
{
if
(
len
>=
sizeof
(
message
))
break
;
len
+=
snprintf
(
message
+
len
,
sizeof
(
message
),
"%f:"
,
i_value
[
i
]);
}
message
[
len
-
1
]
=
'\0'
;
msg_Dbg
(
p_filter
,
"values: %s"
,
message
);
var_SetString
(
p_filter
->
p_libvlc
,
"audiobargraph_v-i_values"
,
message
);
}
return
p_in_buf
;
...
...
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