Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
bbbd014a
Commit
bbbd014a
authored
Jun 19, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use vlc_mutex_locker.
parent
679039d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
21 deletions
+6
-21
modules/audio_filter/spatializer/spatializer.cpp
modules/audio_filter/spatializer/spatializer.cpp
+6
-21
No files found.
modules/audio_filter/spatializer/spatializer.cpp
View file @
bbbd014a
...
@@ -92,21 +92,6 @@ struct aout_filter_sys_t
...
@@ -92,21 +92,6 @@ struct aout_filter_sys_t
revmodel
*
p_reverbm
;
revmodel
*
p_reverbm
;
};
};
class
CLocker
{
public:
CLocker
(
vlc_mutex_t
*
p_lock_to_manage
)
:
p_lock
(
p_lock_to_manage
)
{
vlc_mutex_lock
(
p_lock
);
}
~
CLocker
()
{
vlc_mutex_unlock
(
p_lock
);
}
private:
vlc_mutex_t
*
p_lock
;
};
#define DECLARECB(fn) static int fn (vlc_object_t *,char const *, \
#define DECLARECB(fn) static int fn (vlc_object_t *,char const *, \
vlc_value_t, vlc_value_t, void *)
vlc_value_t, vlc_value_t, void *)
DECLARECB
(
RoomCallback
);
DECLARECB
(
RoomCallback
);
...
@@ -231,7 +216,7 @@ void SpatFilter( aout_instance_t *p_aout, aout_filter_t *p_filter,
...
@@ -231,7 +216,7 @@ void SpatFilter( aout_instance_t *p_aout, aout_filter_t *p_filter,
float
*
out
,
float
*
in
,
int
i_samples
,
int
i_channels
)
float
*
out
,
float
*
in
,
int
i_samples
,
int
i_channels
)
{
{
aout_filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
aout_filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
CL
ocker
locker
(
&
p_sys
->
lock
);
vlc_mutex_l
ocker
locker
(
&
p_sys
->
lock
);
int
i
,
ch
;
int
i
,
ch
;
for
(
i
=
0
;
i
<
i_samples
;
i
++
)
for
(
i
=
0
;
i
<
i_samples
;
i
++
)
...
@@ -267,7 +252,7 @@ static int RoomCallback( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -267,7 +252,7 @@ static int RoomCallback( vlc_object_t *p_this, char const *psz_cmd,
{
{
(
void
)
psz_cmd
;
(
void
)
oldval
;
(
void
)
psz_cmd
;
(
void
)
oldval
;
aout_filter_sys_t
*
p_sys
=
(
aout_filter_sys_t
*
)
p_data
;
aout_filter_sys_t
*
p_sys
=
(
aout_filter_sys_t
*
)
p_data
;
CL
ocker
locker
(
&
p_sys
->
lock
);
vlc_mutex_l
ocker
locker
(
&
p_sys
->
lock
);
p_sys
->
p_reverbm
->
setroomsize
(
newval
.
f_float
);
p_sys
->
p_reverbm
->
setroomsize
(
newval
.
f_float
);
msg_Dbg
(
p_this
,
"room size is now %3.1f"
,
newval
.
f_float
);
msg_Dbg
(
p_this
,
"room size is now %3.1f"
,
newval
.
f_float
);
...
@@ -279,7 +264,7 @@ static int WidthCallback( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -279,7 +264,7 @@ static int WidthCallback( vlc_object_t *p_this, char const *psz_cmd,
{
{
(
void
)
psz_cmd
;
(
void
)
oldval
;
(
void
)
psz_cmd
;
(
void
)
oldval
;
aout_filter_sys_t
*
p_sys
=
(
aout_filter_sys_t
*
)
p_data
;
aout_filter_sys_t
*
p_sys
=
(
aout_filter_sys_t
*
)
p_data
;
CL
ocker
locker
(
&
p_sys
->
lock
);
vlc_mutex_l
ocker
locker
(
&
p_sys
->
lock
);
p_sys
->
p_reverbm
->
setwidth
(
newval
.
f_float
);
p_sys
->
p_reverbm
->
setwidth
(
newval
.
f_float
);
msg_Dbg
(
p_this
,
"width is now %3.1f"
,
newval
.
f_float
);
msg_Dbg
(
p_this
,
"width is now %3.1f"
,
newval
.
f_float
);
...
@@ -290,7 +275,7 @@ static int WetCallback( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -290,7 +275,7 @@ static int WetCallback( vlc_object_t *p_this, char const *psz_cmd,
{
{
(
void
)
psz_cmd
;
(
void
)
oldval
;
(
void
)
psz_cmd
;
(
void
)
oldval
;
aout_filter_sys_t
*
p_sys
=
(
aout_filter_sys_t
*
)
p_data
;
aout_filter_sys_t
*
p_sys
=
(
aout_filter_sys_t
*
)
p_data
;
CL
ocker
locker
(
&
p_sys
->
lock
);
vlc_mutex_l
ocker
locker
(
&
p_sys
->
lock
);
p_sys
->
p_reverbm
->
setwet
(
newval
.
f_float
);
p_sys
->
p_reverbm
->
setwet
(
newval
.
f_float
);
msg_Dbg
(
p_this
,
"'wet' value is now %3.1f"
,
newval
.
f_float
);
msg_Dbg
(
p_this
,
"'wet' value is now %3.1f"
,
newval
.
f_float
);
...
@@ -301,7 +286,7 @@ static int DryCallback( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -301,7 +286,7 @@ static int DryCallback( vlc_object_t *p_this, char const *psz_cmd,
{
{
(
void
)
psz_cmd
;
(
void
)
oldval
;
(
void
)
psz_cmd
;
(
void
)
oldval
;
aout_filter_sys_t
*
p_sys
=
(
aout_filter_sys_t
*
)
p_data
;
aout_filter_sys_t
*
p_sys
=
(
aout_filter_sys_t
*
)
p_data
;
CL
ocker
locker
(
&
p_sys
->
lock
);
vlc_mutex_l
ocker
locker
(
&
p_sys
->
lock
);
p_sys
->
p_reverbm
->
setdry
(
newval
.
f_float
);
p_sys
->
p_reverbm
->
setdry
(
newval
.
f_float
);
msg_Dbg
(
p_this
,
"'dry' value is now %3.1f"
,
newval
.
f_float
);
msg_Dbg
(
p_this
,
"'dry' value is now %3.1f"
,
newval
.
f_float
);
...
@@ -312,7 +297,7 @@ static int DampCallback( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -312,7 +297,7 @@ static int DampCallback( vlc_object_t *p_this, char const *psz_cmd,
{
{
(
void
)
psz_cmd
;
(
void
)
oldval
;
(
void
)
psz_cmd
;
(
void
)
oldval
;
aout_filter_sys_t
*
p_sys
=
(
aout_filter_sys_t
*
)
p_data
;
aout_filter_sys_t
*
p_sys
=
(
aout_filter_sys_t
*
)
p_data
;
CL
ocker
locker
(
&
p_sys
->
lock
);
vlc_mutex_l
ocker
locker
(
&
p_sys
->
lock
);
p_sys
->
p_reverbm
->
setdamp
(
newval
.
f_float
);
p_sys
->
p_reverbm
->
setdamp
(
newval
.
f_float
);
msg_Dbg
(
p_this
,
"'damp' value is now %3.1f"
,
newval
.
f_float
);
msg_Dbg
(
p_this
,
"'damp' value is now %3.1f"
,
newval
.
f_float
);
...
...
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