Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Realtime Voice chat between iOS devices in same network

I'm working in app where I need to implement a simple voice functionality between two iOS devices in same network.

My doubt is about how to get audio units from master device and send over wifi or bluetooth network directly to slave device in realtime.

Some things about network communication I have done, I can transfer any NSData between devices using TCP.

Is very important to not use GK framework, because I need to connect two clients without any notification. For example, when I use GK to connect two devices, the iOS display a alert with a connection request, I need to avoid this connection request.

Currently I can do this with video, is more simple than audio. Any ideias about the implementation of this are welcome.

Thanks.

like image 662
Jan Cássio Avatar asked May 28 '12 15:05

Jan Cássio


2 Answers

First of all, you need learn how to capture the audio using Audio Queue Services.

Then transmit the audio data it over wifi and bluetooth and play it at the other side.

The most obvious choice for you is to use bonjour.

GameKit framework is built on top of this. You dont have to build too much on top of this for your application though. Yours is a straightforward application of bonjour.

Please refer the code for chatty if needed. Incase you need some background theory, please refer to http://mobileorchard.com/tutorial-networking-and-bonjour-on-iphone/.

like image 148
Shashikanth Avatar answered Oct 05 '22 01:10

Shashikanth


I have used Audio Queue Services for the same sort of project.

For Networking I am using Bonjour and it has really solved the problem of transmitting text and video.

Did a lot of workarounds to make a voice chat in wifi using Audio Queue Services but have not succeeded. I will update once I find the solution other than this.

like image 26
Geekoder Avatar answered Oct 04 '22 23:10

Geekoder