Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
mediastreamer2
Commits
60a3af97
Commit
60a3af97
authored
Feb 19, 2014
by
Sylvain Berfini
Browse files
Fix last warning in Android opensles soundcard
parent
fc831b98
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/android/androidsound_opensles.cpp
View file @
60a3af97
...
...
@@ -658,26 +658,16 @@ static SLresult opensles_sink_init(OpenSLESOutputContext *octx) {
SLDataFormat_PCM
format_pcm
;
format_pcm
.
formatType
=
SL_DATAFORMAT_PCM
;
format_pcm
.
numChannels
=
channels
;
format_pcm
.
samplesPerSec
=
sample_rate
;
format_pcm
.
bitsPerSample
=
SL_PCMSAMPLEFORMAT_FIXED_16
;
format_pcm
.
containerSize
=
SL_PCMSAMPLEFORMAT_FIXED_16
;
format_pcm
.
endianness
=
SL_BYTEORDER_LITTLEENDIAN
;
if
(
channels
==
1
)
{
format_pcm
=
{
SL_DATAFORMAT_PCM
,
channels
,
sample_rate
,
SL_PCMSAMPLEFORMAT_FIXED_16
,
SL_PCMSAMPLEFORMAT_FIXED_16
,
SL_SPEAKER_FRONT_CENTER
,
SL_BYTEORDER_LITTLEENDIAN
};
format_pcm
.
channelMask
=
SL_SPEAKER_FRONT_CENTER
;
}
else
if
(
channels
==
2
)
{
format_pcm
=
{
SL_DATAFORMAT_PCM
,
channels
,
sample_rate
,
SL_PCMSAMPLEFORMAT_FIXED_16
,
SL_PCMSAMPLEFORMAT_FIXED_16
,
SL_SPEAKER_FRONT_LEFT
|
SL_SPEAKER_FRONT_RIGHT
,
SL_BYTEORDER_LITTLEENDIAN
};
format_pcm
.
channelMask
=
SL_SPEAKER_FRONT_LEFT
|
SL_SPEAKER_FRONT_RIGHT
;
}
else
{
ms_error
(
"OpenSLES Error trying to use %i channels"
,
channels
);
}
...
...
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