-read this document
http://android.wooyd.org/JNIExample/files/JNIExample.pdf,
especially section 4.2 (already mentioned in the newsgroup)
-then create a class that would play audio in java
-at startup register a java method to call to play a sound with your
JNI callback
-to play a sound from JNI (C/C++) call this method
also the paper mentiones that you should NOT cache the reference to
the class otherwise you get an exception (currently means the program
will crash)
you may also call from a (native) thread - then use
AttachCurrentThread() instead of GetEnv() to get JNI reference
greets
m
On 6 Sep., 16:51, xianghui liu <
largep...@gmail.com> wrote:
> I am looking for the method too?
>
> do someone have ideas?
>
> On Mon, Sep 6, 2010 at 10:02 PM, Ngo Van Luyen <
nvluye...@gmail.com> wrote:
>
> > Hi all,
>
> > Do we have any chance to play audio in NDK C/C++ code (officially and
> > unofficially, stable API/unstable API) ?
>
> > thanks,
>
> > --
> > Hello Android!
> >
http://androidcore.com/
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "android-ndk" group.
> > To post to this group, send email to
andro...@googlegroups.com.
> > To unsubscribe from this group, send email to
> >
android-ndk...@googlegroups.com<
android-ndk%2Bunsu...@googlegroups.com>
> > .