Skip to content

Commit

Permalink
Fix potential issues with OpenSL.
Browse files Browse the repository at this point in the history
  • Loading branch information
kus04e4ek committed Jun 10, 2024
1 parent 5833f59 commit 6981453
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions platform/android/audio_driver_opensl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ Error AudioDriverOpenSL::init_input_device() {

SLDataLocator_AndroidSimpleBufferQueue loc_bq = {
SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE,
2
1,
};
SLDataFormat_PCM format_pcm = {
SL_DATAFORMAT_PCM,
Expand All @@ -220,7 +220,11 @@ Error AudioDriverOpenSL::init_input_device() {
SL_PCMSAMPLEFORMAT_FIXED_16,
SL_PCMSAMPLEFORMAT_FIXED_16,
SL_SPEAKER_FRONT_CENTER,
SL_BYTEORDER_LITTLEENDIAN
#ifdef BIG_ENDIAN_ENABLED
SL_BYTEORDER_BIGENDIAN,
#else
SL_BYTEORDER_LITTLEENDIAN,
#endif
};
SLDataSink recSnk = { &loc_bq, &format_pcm };

Expand Down

0 comments on commit 6981453

Please sign in to comment.