Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
savoirfairelinux
jami-daemon
Commits
1b45e68e
Commit
1b45e68e
authored
Aug 07, 2012
by
Tristan Matthews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* #14455: audiortp: don't destroy noise suppress if not holding the audioProcessMutex
parent
ea31864e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
daemon/src/audio/audiortp/audio_rtp_record_handler.cpp
daemon/src/audio/audiortp/audio_rtp_record_handler.cpp
+5
-2
daemon/src/audio/noisesuppress.cpp
daemon/src/audio/noisesuppress.cpp
+5
-2
No files found.
daemon/src/audio/audiortp/audio_rtp_record_handler.cpp
View file @
1b45e68e
...
...
@@ -88,8 +88,11 @@ AudioRtpRecord::~AudioRtpRecord()
delete
converterDecode_
;
delete
audioCodec_
;
#if HAVE_SPEEXDSP
delete
noiseSuppressEncode_
;
delete
noiseSuppressDecode_
;
{
ost
::
MutexLock
lock
(
audioProcessMutex_
);
delete
noiseSuppressDecode_
;
delete
noiseSuppressEncode_
;
}
#endif
}
...
...
daemon/src/audio/noisesuppress.cpp
View file @
1b45e68e
...
...
@@ -59,10 +59,13 @@ NoiseSuppress::NoiseSuppress(int smplPerFrame, int samplingRate) :
NoiseSuppress
::~
NoiseSuppress
()
{
speex_preprocess_state_destroy
(
noiseState_
);
noiseState_
=
0
;
}
void
NoiseSuppress
::
process
(
SFLDataFormat
*
data
,
int
samples
)
{
assert
(
smplPerFrame_
==
samples
);
speex_preprocess_run
(
noiseState_
,
data
);
if
(
noiseState_
)
{
assert
(
smplPerFrame_
==
samples
);
speex_preprocess_run
(
noiseState_
,
data
);
}
}
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