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
f388aade
Commit
f388aade
authored
Aug 20, 2013
by
Tristan Matthews
Browse files
* #28679: audio: use correctly sized buffer for resampling
parent
63a40673
Changes
1
Hide whitespace changes
Inline
Side-by-side
daemon/src/audio/samplerateconverter.cpp
View file @
f388aade
...
@@ -101,9 +101,8 @@ void SamplerateConverter::resample(const AudioBuffer &dataIn, AudioBuffer &dataO
...
@@ -101,9 +101,8 @@ void SamplerateConverter::resample(const AudioBuffer &dataIn, AudioBuffer &dataO
/*
/*
TODO: one-shot deinterleave and float-to-short conversion
TODO: one-shot deinterleave and float-to-short conversion
currently using floatBufferIn_ as scratch
*/
*/
SFLAudioSample
*
scratch_buff
=
reinterpret_cast
<
SFLAudioSample
*>
(
floatBufferIn_
.
data
()
);
std
::
vector
<
SFLAudioSample
>
scratch_buff
(
outSamples
);
src_float_to_short_array
(
floatBufferOut_
.
data
(),
scratch_buff
,
outSamples
);
src_float_to_short_array
(
floatBufferOut_
.
data
(),
scratch_buff
.
data
()
,
outSamples
);
dataOut
.
deinterleave
(
scratch_buff
,
src_data
.
output_frames
,
nbChans
);
dataOut
.
deinterleave
(
scratch_buff
.
data
()
,
src_data
.
output_frames
,
nbChans
);
}
}
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