How do I stream alaw audio?
I have a source that streams wav a开发者_JAVA百科udio in alaw format which I would like to receive in Android, but Android only supports linear PCM: Android Supported Media Formats
There are a few apps on the market that stream alaw, but I'm not sure how the developers made it happen. What is the correct approach to adding this functionality?
Probably a little late, but doing 16-bit Linear PCM to 8-bit alaw or ulaw is pretty straightforward: http://en.wikipedia.org/wiki/G.711. You could either use a 256-value lookup table (probably the easiest), or implement the "algorithm" directly.
精彩评论