View Full Version : I'm trying to do an audio streaming application

07-25-2012, 11:51 PM
I want to stream audio via udp, and play it on the device, I have checked the source (and ofc) there was no way to do this, any tips/help for the implementation?


07-26-2012, 12:23 AM
Well, two ways to go about this:

1. Use high level native device methods, for instance, iOS cocoa stuff has functions to stream audio from the 'net, provided the files/broadcast is in the right format. The only problem is you would have to re-figure out and redebug this for each platform, and some platforms probably don't have a way to do it. Very not portable and you have to know ObjectiveC or whatever the platform uses.

2. Write a SoundManagerMixer class and do your own mixing, and stream the raw data to the native platform. I think all platforms support a way to do this (feeding in a raw audio stream, for custom mixing), but would need to be setup per device. Once this is working, then you can decompress/mix in the audio from the net with custom code/libraries in any way you want. (ogg/mp3 decompression/panning/pitch shifting/etc could also be added, and would work across all platforms..)

So, 1 is less work and might be ok if you were targeting a single platform, 2 is a lot of work but more flexible, and is generally the way it's done in the big-time company private frameworks I've seen when doing contract work.

07-26-2012, 12:49 AM
Seems like a uber hard task, but will try to do it, thank you for the tips!