Reputation: 77596
I already know how to stream video from my iphone to my cocoa server. it's simple because videos come in different frames, and i can transfer them 1 by 1.
1- But how does the audio streaming works, how can i separate the data being read from microphone without interrupting the data?
2- How can i make sure that the audio matches the video, and keep the timing between them?
This is not a duplicate, there are questions with the same title, but the details are different.
Upvotes: 1
Views: 503
Reputation: 70693
The audio comes back from the OS in buffer data blocks of some length (duration of which is partially configurable) which you can transfer 1 by 1 just like the video. You can queue up and rechunk the blocks as necessary. If you attach a header to each audio transfer block, you can tag the audio data with a time stamp and/or the contemporaneous video frame capture ID.
Upvotes: 2