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
9308e26d
Commit
9308e26d
authored
Sep 10, 2013
by
Alexandre Lision
Browse files
* #29866: fixed buffer initialization
parent
efb6f574
Changes
2
Hide whitespace changes
Inline
Side-by-side
daemon/src/audio/audiobuffer.cpp
View file @
9308e26d
...
...
@@ -31,7 +31,7 @@
#include
<iostream>
#include
"audiobuffer.h"
AudioBuffer
::
AudioBuffer
(
size_t
sample_num
/* = 0 */
,
unsigned
channel_num
/* = 1 */
,
int
sample_rate
/* = 8000 */
)
AudioBuffer
::
AudioBuffer
(
size_t
sample_num
,
unsigned
channel_num
/* = 1 */
,
int
sample_rate
/* = 8000 */
)
:
sampleRate_
(
sample_rate
),
samples_
(
std
::
max
(
1U
,
channel_num
),
std
::
vector
<
SFLAudioSample
>
(
sample_num
,
0
))
...
...
daemon/src/audio/opensl/opensllayer.cpp
View file @
9308e26d
...
...
@@ -147,8 +147,8 @@ OpenSLLayer::OpenSLLayer()
,
recorderBufferQueue_
(
0
)
,
playbackBufferIndex_
(
0
)
,
recordBufferIndex_
(
0
)
,
playbackBufferStack_
(
ANDROID_BUFFER_QUEUE_LENGTH
,
AudioBuffer
(
0
))
,
recordBufferStack_
(
ANDROID_BUFFER_QUEUE_LENGTH
,
AudioBuffer
(
0
))
,
playbackBufferStack_
(
ANDROID_BUFFER_QUEUE_LENGTH
,
AudioBuffer
(
300
0
))
,
recordBufferStack_
(
ANDROID_BUFFER_QUEUE_LENGTH
,
AudioBuffer
(
300
0
))
{
}
...
...
@@ -490,7 +490,6 @@ OpenSLLayer::startAudioCapture()
buffer
.
reset
();
DEBUG
(
"Enqueue record buffer
\n
"
);
DEBUG
(
"buffer.getData()[0].size():%d"
,
buffer
.
getData
()[
0
].
size
());
result
=
(
*
recorderBufferQueue_
)
->
Enqueue
(
recorderBufferQueue_
,
buffer
.
getData
()[
0
].
data
(),
buffer
.
getData
()[
0
].
size
());
// the most likely other result is SL_RESULT_BUFFER_INSUFFICIENT,
...
...
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