Streaming Audio Using the AVPlayer - iphone

I want to use the AVPlayer to stream audio, I only want to stream single tracks so not bothered about queuing. Does anyone know of any good examples online of how to do this. I'm also not to bothered about track time but will need to know it when it is ready to play, and if get interrupted etc.
Cheers

The Apple demo is good for what you are asking:
http://developer.apple.com/library/ios/#samplecode/AVPlayerDemo/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010101

Related

Live streaming audio from iPhone

I would like to stream audio from my iPhone to a remote server but I don't really know what is my best bet.
I tried here a code for sending small chunks but I have some some audio gaps between chunks.
So I think about FFmpeg or as suggested here writing my own AAC parser.
Any code sample or advices would be appreciated because I have hard time to get started
Another core audio based Audio Player: https://github.com/douban/DOUAudioStreamer .
Just see the examples to use.
In my opinion, this one is better designed than Matt Gallagher's one.
Another alternative is to use my Audjustable AudioPlayer player here: https://github.com/tumtumtum/audjustable
Some good audio stream player on gitHub:-
mattgallagher/AudioStreamer:-https://github.com/mattgallagher/AudioStreamer
tumtumtum/StreamingKit:-https://github.com/tumtumtum/StreamingKit
you can also sreach on github :-
1)muhku/FreeStreamer
2)nicklockwood/SoundManager
3)AFSoundManager
4)GVMusicPlayerController
for live audio streaming StreamingAudioPlayer is best which is developed by Matt Gallagher and it is easy to use
see this AudioStreame

RadioKit Alternative For Live Streaming Audio From URL

I was doing some reading up on RadioKit
I like what they use, and it works well for my ShoutCast stream, but the price of it is a bit more than I can really do ($99) per app. Are there any good tutorials for setting up a simple stream from URL player that can pause, rewind, and display what file is currently playing on the stream?
have a look at this site..
http://www.cocoawithlove.com/2009/06/revisiting-old-post-streaming-and.html
Its a bit old, but it should atleast get you up and started

How to Build Audio File Stream iPhone App?

I need some guidance on how to make a audio stream app for multiple audio files, so the app user can choose from the list and listen to the item.Do you know any good tutorials, or place from where i can learn how to do this by my self. I'm familiar with the concept on how it wood look like, i need something on how to pause and resume, how to go to next and previous are there some classes that can help me do this. Can someon help me?
Look into AVQueuePlayer if you can require your users to run iOS 4.1+. It can help you stream a sequential playlist of items. AVPlayer is another option, which only requires iOS 4.0+, but it can only handle one item at a time, so you'd have to write your own code to manage the playlist.
The AV Foundation Programming Guide does a pretty good job of explaining how to use these classes.

Streaming a video on iPhone and then storing it on the device

I've been told that some apps have video streaming which streams initially and when completely downloaded the video is stored to the user's device for quick and internet-free subsequent viewing.
Firstly, is this possible? Secondly, could you point me towards resources demonstrating how it could be done, or possibly offer some insight to get me started?
Thanks friends.
good tutorial on how to stream video:
http://buildmobilesoftware.com/2010/08/09/how-to-stream-videos-on-the-iphone-or-ipad/

Is it possible to both play a sound and record from the microphone at the same time on the iPhone?

I want to both play sound and record sound at the same time on the iPhone.
All the apps which record sound first disable any music playing. However as music would disrupt their purpose I don't know if they're doing this deliberately or whether the iPhone does it automatically when you record from the microphone.
Does anyone have experience with this?
Refer to this page. Good luck!
I've heard something about this on one episode of the mobile orchard podcast - the one with Michael Tyson, the creator of Loopy. During the discussion, Michael explained that he had to include some code to filter out the sounds that were coming in through the microphone in realtime as other sounds were being played on the speaker.
Based on that discussion, it seems entirely possible to both play and record at the same time, but I'm sure you'll have to do your own filtering to avoid recording the sounds your playing.
You can use either a core audio unit or an audio queue, and
you need to make sure that your audio session category is set to kAudioSessionCategory_PlayAndRecord.
Beware that sound output when you use this session is much quieter
than the normal solo session (observed on 3.0).