Android, msm_pcm_out device and ALSA lib
Could anyone tell me if it is possi开发者_开发技巧ble to use alsa lib directly in native C code in Android?
Because I must receive raw data from native C code socket fd, I think it is better to play it out in native C, too. I have searched a lot and found that I could play pcm data directly by using msm_pcm_out device, but I could not find this device in my platform. So my last choice is using alsa lib. My questions are:
Could I add msm_pcm_out device by myself ? And use it just like the sample playwav.c?
If adding the msm_pcm_out device is not possible, could I use alsa lib in native C?
If all I mentioned above are impossible, any suggestion?
Thank you.
Search result :
MSM_PCM_* are the specified devices in Qualcomm MSM7K series chip, so other platform would not have this !
It seems that using ALSA lib directly in native C is not possible because the ALSA resource would be engaged by system.
Update : Use ALSA API to do the play would not work, but record works ! (Strange...)
My last choice might be using the OpenSL ES...
Any suggestion would be appreciated.
精彩评论