Discussion:
OpenSLES | Destroy call not returning
s...@sensibol.com
2018-07-20 12:23:36 UTC
Permalink
Hello All,

For following code-snippet


SLengine engine;
slCreateEngine(&engine, ...
.
SLObjectItf play = nullptr;
(*engine)->CreateAudioPlayer(engine, &play, ....
.
.
.
if (nullptr != play) {
(*play)->Destroy(play);
play = nullptr;
}


in which situation could the *Destroy* call be blocked on play object?

*Things tried so far:*

My initial implementation was creating and destroying, engine and play
objects on different threads. I assumed that, this might be the cause and
changed the implementation. Now, both the objects are being created and
destroyed on the same thread. But the problem still persists. I also have
an audio recorder object, which is being destroyed successfully.

Any help would be greatly appreciated!

Thank You
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/c0963d29-5f58-4beb-8355-d79afecf3c7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Glenn Kasten
2018-07-21 18:45:11 UTC
Permalink
Can you please check the logcat around the time of Destroy, and see if
there is anything related?
In particular look for messages about possible deadlock or other warnings
or errors from your app or audio.
If so, please include those messages ... they might be helpful.
Post by ***@sensibol.com
Hello All,
For following code-snippet
SLengine engine;
slCreateEngine(&engine, ...
.
SLObjectItf play = nullptr;
(*engine)->CreateAudioPlayer(engine, &play, ....
.
.
.
if (nullptr != play) {
(*play)->Destroy(play);
play = nullptr;
}
in which situation could the *Destroy* call be blocked on play object?
*Things tried so far:*
My initial implementation was creating and destroying, engine and play
objects on different threads. I assumed that, this might be the cause and
changed the implementation. Now, both the objects are being created and
destroyed on the same thread. But the problem still persists. I also have
an audio recorder object, which is being destroyed successfully.
Any help would be greatly appreciated!
Thank You
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/95600d25-655f-4773-aa72-3dfcb2d466fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...