Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
f58b386f
Commit
f58b386f
authored
Aug 21, 2013
by
Tristan Matthews
Browse files
* #28691: pulseaudio: fix resampling of captured mic input
parent
99c14e26
Changes
1
Hide whitespace changes
Inline
Side-by-side
daemon/src/audio/pulseaudio/pulselayer.cpp
View file @
f58b386f
...
...
@@ -509,8 +509,8 @@ void PulseLayer::readFromMic()
const
char
*
data
=
NULL
;
size_t
bytes
;
size_t
sample_size
=
record_
->
sampleSize
();
uint8_t
channels
=
record_
->
channels
();
const
size_t
sample_size
=
record_
->
sampleSize
();
const
uint8_t
channels
=
record_
->
channels
();
if
(
pa_stream_peek
(
record_
->
pulseStream
()
,
(
const
void
**
)
&
data
,
&
bytes
)
<
0
or
!
data
)
return
;
...
...
@@ -519,7 +519,9 @@ void PulseLayer::readFromMic()
outfile
.
write
((
const
char
*
)
data
,
bytes
);
#endif
size_t
samples
=
bytes
/
sample_size
;
assert
(
channels
);
assert
(
sample_size
);
const
size_t
samples
=
bytes
/
sample_size
/
channels
;
AudioBuffer
in
(
samples
,
channels
,
sampleRate_
);
in
.
deinterleave
((
SFLAudioSample
*
)
data
,
samples
,
channels
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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