开发者

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:

  1. Could I add msm_pcm_out device by myself ? And use it just like the sample playwav.c?

  2. If adding the msm_pcm_out device is not possible, could I use alsa lib in native C?

  3. If all I mentioned above are impossible, any suggestion?

Thank you.


Search result :

  1. MSM_PCM_* are the specified devices in Qualcomm MSM7K series chip, so other platform would not have this !

  2. 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...)

  3. My last choice might be using the OpenSL ES...

Any suggestion would be appreciated.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜