Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
303fde7e
Commit
303fde7e
authored
May 26, 2010
by
Alexandre Savard
Browse files
[#1966] Add echocancel in non-resampled alsa capture process
parent
d5fc9716
Changes
1
Hide whitespace changes
Inline
Side-by-side
sflphone-common/src/audio/alsa/alsalayer.cpp
View file @
303fde7e
...
...
@@ -971,10 +971,7 @@ void AlsaLayer::audioCallback(void)
// TODO: Audio processing should be performed inside mainbuffer
// to avoid such problem
AudioLayer
::
_echoCancel
->
setSamplingRate
(
_mainBufferSampleRate
);
// Copy far-end signal in echo canceller to adapt filter coefficient
AudioLayer
::
_echoCanceller
->
putData
(
out
,
toGet
);
AudioLayer
::
_echoCancel
->
setSamplingRate
(
_mainBufferSampleRate
);
if
(
_mainBufferSampleRate
&&
(
(
int
)
_audioSampleRate
!=
_mainBufferSampleRate
))
{
...
...
@@ -999,6 +996,9 @@ void AlsaLayer::audioCallback(void)
}
// Copy far-end signal in echo canceller to adapt filter coefficient
AudioLayer
::
_echoCanceller
->
putData
(
out
,
toGet
);
}
else
{
if
(
!
tone
&&
!
file_tone
)
{
...
...
@@ -1099,7 +1099,9 @@ void AlsaLayer::audioCallback(void)
}
else
{
getMainBuffer
()
->
putData
(
in
,
toPut
,
100
);
int
sampleready
=
AudioLayer
::
_echoCanceller
->
processAudio
(
in
,
echoCancelledMic
,
toPut
);
getMainBuffer
()
->
putData
(
echoCancelledMic
,
sampleready
*
sizeof
(
SFLDataFormat
),
100
);
}
}
...
...
Write
Preview
Supports
Markdown
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