Synchronized Audio Streaming over Bluetooth - iphone

I am working on an iPhone app that needs to stream audio file to multiple devices (iPhone) connected via Bluetooth and play it in the Synchronized way, that is, all the devices starts playing the audio file simultaneously.
I am able to make a connection and stream the audio packet and even play the audio file, but the only issue that I am facing is the Latency. All the devices starts playing the audio file at different time, I want all of them to play the same audio packet together. Is there any way I can make them play audio file synchronously?

I remember glancing over audio broadcast option in the bluetooth spec. Not sure whether iphone supports it..

Related

Recording audio output only from speaker of iphone excluding microphone

I am trying to record the sound from iPhone speaker. I am able to do that, but I am unable to avoid mic input in the recorded output. Tried with sample code available in different websites with no luck.
The sample which I used does the recording with audio units. I need to know if there is any property for audio unit to set the mic input volume to zero. Above that I came to from other posts that Audio Queue services can do the thing for me. Can any one redirect me with sample code for the audio queue services implementation. I need to know whether there is a way of writing the data to an separate audio file before sending it as input to speaker.
Thanks in advance
There is no public iOS API or property for recording generic audio sent to the iPhone speaker. Only mic input can be recorded.
But if you are playing audio in your app using only uncompressed samples with Audio Queues or the RemoteIO Audio Unit, you can just copy those samples to a file before you write them to the audio callback buffers. Those saved samples can be used to construct a recording.

Record iphone System or audio player sound

I am developing an app module in which i am doing audio recording with also video recording.
but i want to record only device intrnal playing sound , not the device external voice.
If any advise or suggestion to got it..!!
I'm not sure but maybe you can use buffers to write them into a file Audio units or Audio Queues without using mic

How to change from Wi-Fi to 3G while iPhone is receiving an audio stream?

My iPhone application plays a wma audio stream over the mms:// protocol.
When the Wi-Fi connection drops it won't switch to 3G to continue streaming. I have enough buffer to play for another 15 seconds (I tried to increase the buffer size, but it will stop anyway).
What sort of mechanism can I implement so the playing won't stop and the iPhone changes from Wi-fi to 3G?
In other posts I saw that it should do it automatically, but in my case it doesn't, because its wma over mms protocol.
Thanks!
I may be talking out my butt, however, you could try detecting the Error from the connection when it fails. and restart the stream from your buffered location so you can resume the download. If the internet is down the iPhone should reconnect it to accommodate your new request for the mms feed.

Is there a way to record device audio on the iPhone?

AVAudioRecorder allows the recording of external audio. However I wish to record the audio made by my application (through numerous AVAudioPlayers), is this possible on the iPhone?
If you want to record the sounds your iOS app makes, you have to use a much lower lever API, such as Audio Unit RemoteIO, or Audio Queues with raw PCM audio samples.

Streaming songs to connected devices using gamekit

I want to play the song from one iphone to the other, it is like the user from device A selects a song from his IPod and plays it, while the users on Device B can also listen to that song using their own iphone which is connected to the Device A using either the Game Kit or wifi.
So is it possible to stream the song from the ipod library to the other devices or not.
This is not possible technically, because you can't get to the audio data -- either as a decoded PCM stream or as the original encoded AAC or MP3 files -- via the MPMusicPlayerController or any other public API. Therefore device A is not in a position to send audio data over the network to device B.
Device B could receive and play streamed audio from the network, of course, since that's what apps like Pandora, Last.fm, and AOL Radio do. But for device A to send the data, it would have to use some source other than its own iPod library.
From the point of view of copyright protection, I don't think this is possible - legally, that is.
It might be possible technically, in that you may be able to send the raw bytes of the song file over wifi or bluetooth and then decode and play them on the second device, but that surely won't get past Apple's reviewers.