How to Build Audio File Stream iPhone App? - iphone

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.

Related

Custom audio control for ios apps

We are creating an app using Swift on IOS that needs to use custom audio controls: a play button, a stop button, a current time/pos indicator, the duration and perhaps even a seek bar to play 1 audio file that is built into the application. My friend has worked hard on this project but so far was unable to find a solution. Is it possible using mediaplayer or is another api easier, possibly something similar to exoplayer for android apps.
Thanks.
In my opinion I would say that using AVFoundation would probably be easiest since it is built into swift you just have to do import AVFoundation and you would probably want to create an AVAudioPlayer to listen to the music. Also the API is pretty simple. If you need any help getting started I found this article on Mashable that shows how to play audio and how to control it with a custom play and pause button. https://medium.com/yay-its-erica/creating-a-music-player-app-in-swift-3-53809471f663. Also I found on Apple's documentation how to get the current time of the audio playing https://developer.apple.com/documentation/avfoundation/avaudioplayer/1387297-currenttime. I hope I was able to help and if you have anymore questions don't hesitate to ask!

How to play two audio files from the iPod library simultaneously?

I know that the MediaPickerConroller can be used to access the iPod library, however I'm not sure that it can play two songs at the same time. AVFoundation would allow this, but then how do you get AVFoundation to access the library? Is there an easier way of doing this? Any help appreciated, thanks.
One way - though not exactly an easy way - to play more than one audio files at the same time is to use an Audio Processing Graph. "MixerHost", the example app by Apple, is a good starting point. "AudioGraph" (https://github.com/tkzic/audiograph) has more functionality than you want, but the manual is helpful to understand the basics of audio processing graphs.
The MediaPickerConroller will allow you to select more than one item from the iTunes library. You will have to get the list of URLs from the media picker and connect them to the graph yourself.

Wanted to know favorite play list songs of end users, should be on server or client side(sqlite) iPhone sdk?

Actually i am developing an app like net flix and in that i need to save favorite songs of end user, i am playing http live streamed videos and also i need to save played time of an video so that end user would be able to play a song from where he has left this song rather then just play it again from beginning.
They are sending me url of streamed videos in following format
http://xxxxxxxxxx/vod/definsts/mp4/low/mp4:1975010026_01.mp4/playlist.m3u8
so my question is that
What should be the best option to save user's favorite songs according to streamed url, means net flix kind of app having favorite songs in client side or at server side.what should be the preferred one and i am using MPMediaPlayerController from apple MoviePlayer sample app code.
If some one has any idea and want to know any thing more from my side then i will be available. I am and will be highly obliged for your any help.
Sorry but my English is not good and i don't know how to play with words.
Any small help or suggestion would be much appreciated.
Preferably your best option here looks like server side;
Saving the Data When you are removed from the application should be ultimately dealt with on the execution of the app to close.
you have multiple options when doing server Side Calls, One i found to be the best is ASIHTTPRequestDelegate
this has worked wonders and is fairly easy to learn.
You may even want to look into a REST method of pulling Video Feeds, may be a Faster and more secure approach.
hope this Helped! :)

iPhone: Building talking puppet application

I am trying to learn and build talking puppet iPhone application. The great example is "Talking Ben the Dog" and here is youtube video. I have no idea how am I going to build such application. I have a graphics designer who will do their part. As a being programmer, what would I need to be aware of? If someone can throw their ideas or point me some relavant documentation or sample code would be great help.
Thanks.
First, you'll need to create the content. That means the animation scenes and any associated audio. Next, you'll want to trigger those scenes based upon the user's input.
If you want more advanced functionality like "talk back" where the app repeats what you say, then you'll need to get a grip with AudioQueue and AudioUnit APIs. That means detecting levels of incoming audio then triggering writing audio in to stored buffers. These APIs are difficult so this will be the most technically challenging part. You'll need to be comfortable with pointers and other lower level programming concepts.
For an app without talk back, a lot of work will be required to create the content. Then you'll need to re-create the animations using UIImage and the Core Animation framework in your app.
There are a lot of great videos on the Apple site and sample code. This will be a brilliant learning curve for you to get up to speed with Core Animation.
Just make a couple of videos for every scene and play them according to button click!

Recording sounds created within an iPhone app

I'm new to programming in Objective-c and the iPhone but I am working on an app to teach myself. I have been trying to figure out how to record sounds on the iPhone. Apple provides excellent documentation for recording from the microphone with AVAudioRecorder but I want to record sounds made by my app, or even just record sounds when buttons are pressed (button is pressed, certain audio gets recorded).
I have no clue how to do this and can't seem to find anything that would help me along this path, only microphone stuff.
Can anyone share ideas or code that would make this possible?
Thanks
Once you move beyond the convenience classes like AVAudioRecorder, you've got a lot of studying to do.
I would start with:
Getting Started with Audio and Video
Multimedia Programming Guide:Audio
Core Audio Overview
Audio programming is a very large and complex subject. If you want to customize, be prepared to spend some time learning it.
I've made a sample app that records sounds/audio and has a playback. Hope this helps! https://github.com/casspangell/AudioMic