cocoa touch - Stream from iOS to Server -


how go sending live audio stream server? can access raw pcm data being played iphone speaker , want allow others grab , stream url. sort of when access icecast stream url , starts grabbing stream.

i clarify streaming ios device server, if type in url server start downloading ever stream on phone @ , if idevice wasn't streaming there nothing.

see apple's documentation on output streams here

note on ios must set nsoutputstream cfstream (then cast via toll-free bridging) so:

cfreadstreamref readstream; cfwritestreamref writestream; cfstreamcreatepairwithsockettohost(null, (cfstringref)[website host], 80, &readstream, &writestream);  nsinputstream *inputstream = (__bridge_transfer nsinputstream *)readstream; nsoutputstream *outputstream = (__bridge_transfer nsoutputstream *)writestream; 

other that, documentation gives necessary information–keep in mind pcm high bitrate, there might stream stuttering.

i'm not sure framework you're using microphone access, when delegate function called indicating buffer ready, write contents of buffer stream (example in - (void)stream:(nsstream *)stream handleevent:(nsstreamevent)eventcode function).


Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -