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
5f1fcaaa
Commit
5f1fcaaa
authored
Apr 16, 2014
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audiobargraph_a: move variable declaration
parent
4958368b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
modules/audio_filter/audiobargraph_a.c
modules/audio_filter/audiobargraph_a.c
+5
-7
No files found.
modules/audio_filter/audiobargraph_a.c
View file @
5f1fcaaa
...
...
@@ -147,9 +147,6 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
float
*
p_sample
=
(
float
*
)
p_in_buf
->
p_buffer
;
float
i_value
[
AOUT_CHAN_MAX
];
ValueDate_t
*
current
=
NULL
;
float
sum
;
int
count
=
0
;
int
nbChannels
=
aout_FormatNbChannels
(
&
p_filter
->
fmt_in
.
audio
);
...
...
@@ -186,7 +183,7 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
/* 3 - delete too old values */
while
(
p_sys
->
first
->
date
<
(
new
->
date
-
p_sys
->
time_window
))
{
p_sys
->
started
=
1
;
// we have enough values to compute a valid total
current
=
p_sys
->
first
;
ValueDate_t
*
current
=
p_sys
->
first
;
p_sys
->
first
=
p_sys
->
first
->
next
;
free
(
current
);
}
...
...
@@ -195,11 +192,12 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
if
((
p_sys
->
started
)
&&
(
p_in_buf
->
i_pts
>
p_sys
->
lastAlarm
+
p_sys
->
repetition_time
))
{
/* 4 - compute the RMS */
current
=
p_sys
->
first
;
sum
=
0
.
0
;
ValueDate_t
*
current
=
p_sys
->
first
;
float
sum
=
0
.
0
;
int
count
=
0
;
while
(
current
!=
NULL
)
{
sum
+=
current
->
value
;
count
++
;
count
++
;
current
=
current
->
next
;
}
sum
/=
count
;
...
...
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