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

SL_RESULT_CONTENT_UNSUPPORTED when opening InputStream #82

Closed
niklasdahlheimer opened this issue Apr 14, 2018 · 3 comments
Closed

SL_RESULT_CONTENT_UNSUPPORTED when opening InputStream #82

niklasdahlheimer opened this issue Apr 14, 2018 · 3 comments

Comments

@niklasdahlheimer
Copy link

niklasdahlheimer commented Apr 14, 2018

Hey guys,
I got an internal error when opening an inputStream, which I can not identify. Maybe you have an idea.

I'm preparing the builder with these values:
audiostreamin

Then call I call oboe::Result mResult = mBuilder.openStream(&m_stream);

and receive an internal error. Logcat says:
I/OboeAudio: AudioStreamOpenSLES::open(chans:1, rate:0) I/libOpenSLES: Emulating old channel mask behavior (ignoring positional mask 0x1, using default mask 0x10 based on channel count of 1) E/AudioRecord: AudioFlinger could not create record track, status: -1 E/libOpenSLES: android_audioRecorder_realize(0x7a9cbe2c2000) error creating AudioRecord object; status -1 W/libOpenSLES: Leaving Object::Realize (SL_RESULT_CONTENT_UNSUPPORTED) E/OboeAudio: Realize recorder object result:SL_RESULT_CONTENT_UNSUPPORTED

I found out that the SL_RESULT_CONTENT_UNSUPPORTED message could be caused by a missing permission, so I set
<uses-permission android:name="android.permission.RECORD_AUDIO"/>

But that didn't change anything. Somebody has an idea about that?

PS: Is it planned to create a reference for the oboe class instead of the FullGuide someday? Would be great to have something more structured even if the FullGuide is great.

@niklasdahlheimer
Copy link
Author

niklasdahlheimer commented Apr 15, 2018

A few additions:

-I've tried several framerates (48000, 44100,8000) and Chanlle counts (1,2)
-I've tried reducing the frames per callback and the buffersize
-I've ran the app on API 24 (x86) and API 26 (x86_64)
-An Output streambuilder, which I built with a similar configuration, worked fine

@philburk
Copy link
Collaborator

Setting the permission in the Manifest is not enough. You also have to request permission from the user. This extra step is to improve privacy protection. An example of how to do that is here:

https://github.com/googlesamples/android-audio-high-performance/blob/master/aaudio/echo/src/main/java/com/google/sample/aaudio/echo/MainActivity.java#L159

The same technique should work with any app that does recording.

Let us know if that fixes the problem.

And, yes, we need a tutorials and user guides for Oboe.

@niklasdahlheimer
Copy link
Author

Hey Phil,
Thank you so much! Indeed that fixed the problem. Guess I've overlooked the echo-sample.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants