Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oboe doesn't work on android API 19..21 emulators #790

Closed
vlkv opened this issue Feb 16, 2020 · 5 comments
Closed

Oboe doesn't work on android API 19..21 emulators #790

vlkv opened this issue Feb 16, 2020 · 5 comments
Assignees
Labels
bug P1 high priority version related to compatibility with older versions
Milestone

Comments

@vlkv
Copy link

vlkv commented Feb 16, 2020

Android Version(s): API 19, 20, 21
Android Device(s): Nexus 4
Oboe Version: 1.3.2 (babddb0 ("Fix erroneous restart on initial device list notification", 2020-02-06))

Short Description
LiveEffect app segfaults when opening input stream with messages:

D/OboeAudio: openStream() INPUT -------- OboeVersion1.3.2 --------
I/OboeAudio: AAudioLoader::open() could not find libaaudio.so
W/OboeAudio: SharingMode [AudioStreamBuilder::setSharingMode()] is not supported on OpenSLES streams.
    PerformanceMode [AudioStreamBuilder::setPerformanceMode()] is not supported on OpenSLES streams running on pre-Android N-MR1 versions.
I/OboeAudio: AudioStreamOpenSLES::open(chans:2, rate:0)
W/OboeAudio: configurePerformanceMode() not supported until N_MR1
W/AudioRecord: AUDIO_INPUT_FLAG_FAST denied by client
E/AudioRecord: Could not get audio input for record source 6
E/libOpenSLES: android_audioRecorder_realize(0xb7ea77d0) error creating AudioRecord object
W/libOpenSLES: Leaving Object::Realize (SL_RESULT_CONTENT_UNSUPPORTED)
E/OboeAudio: Realize recorder object result:SL_RESULT_CONTENT_UNSUPPORTED
A/libc: Fatal signal 11 (SIGSEGV) at 0x00000030 (code=1), thread 5909 (oboe.liveeffect)
Process 5909 terminated.

Steps To Reproduce
Build LiveEffect sample app. Run it on Nexus 4 API 19 (I used emulator). Select "Open SL ES". Click button "Start". Segfault.

Expected behavior
The app should work without segfault.

Actual behavior
The app segfaults...

Additional context
I'm developing an app https://play.google.com/store/apps/details?id=ru.vitvlkv.vocalizzo.full&hl=en_US and when I've switched from Java audio to Oboe, I've discovered that my app has lost support for the Android 5.0 API 21 (Huawei P8). Checked that on API 19, same thing.

@vlkv vlkv added the bug label Feb 16, 2020
@vlkv vlkv changed the title Oboe doesn't work on android API 19 Oboe doesn't work on android API 19..21 Feb 16, 2020
@vlkv
Copy link
Author

vlkv commented Feb 23, 2020

UPDATE: It looks like oboe works fine on those real devices, but fails on emulators. Cannot prove it myself, don't own such a device...

@philburk
Copy link
Collaborator

philburk commented Feb 24, 2020

Maybe related to #232 and #346

@dturner dturner changed the title Oboe doesn't work on android API 19..21 Oboe doesn't work on android API 19..21 emulators Feb 24, 2020
@dturner
Copy link
Collaborator

dturner commented Mar 4, 2020

Just tried running hello-oboe on the Nexus 4 API 19 emulator. App crashed on startup with the following output:

E/AUDIO-APP: Error creating playback stream. Error: ErrorInvalidFormat
A/libc: Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 9643 (.oboe.hellooboe)

Question is, why is it giving ErrorInvalidFormat?

Seems that setting the stream format to float was causing this. Removing that and the app still crashes with:

A/libc: heap corruption detected by dlfree
    Fatal signal 6 (SIGABRT) at 0x00002605 (code=-6), thread 9733 (.oboe.hellooboe)

Audio does definitely work in the API 19 emulator as I tested it successfully with UAMP. It may be that OpenSL ES is broken on API 19 - 21.

@philburk Perhaps we should add this to QuirksManager. This SO question would allow us to detect whether we're running on an emulator (although it's using Java API so some hackery using JNI required).

@philburk philburk added the P1 high priority label Jun 17, 2020
@philburk philburk added the version related to compatibility with older versions label May 13, 2021
@eliasku
Copy link

eliasku commented Jul 27, 2021

For me also. Pixel 3 API 30 emulator runs without crash but with no sounds. On real device I hear the playback. Static linking, oboe 1.6.1

@dturner dturner added this to the V1.7.0 milestone Sep 22, 2021
@dturner dturner removed their assignment Apr 21, 2022
@robertwu1
Copy link
Collaborator

Emulators below API level 22 are no longer available on AVD manager. Thus, closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug P1 high priority version related to compatibility with older versions
Projects
None yet
Development

No branches or pull requests

6 participants