I've 开发者_如何转开发seen questions on here about this, but no can't find any solutions. Does anyone have a push in the right direction for streaming audio picked up from the mic to a server? Like a one-way walkie talkie.
You'll need a combination of AVCaptureSession
and AVCaptureDevice
to read from the microphone - see the AV Foundation Programming Guide.
Then once you've got the data you'll need to stream it up to a server. Use TCP/IP sockets (see the CFNetwork Programming Guide).
Then just read the mic data, optionally transform it (compress, bit rate etc) and push it down the socket.
精彩评论