I do not want any code but want to get a reference about my question mentioned below...
There is background music available and there is recording option in my app...
Once I start recording , application records my sound and when play button clicks , It will play the recording along with the background music...
I had use this Link but can not get as I want...
I think there is a mechanism like merging two audio files and make it one before playing....
How can I achieve this by coding... Is there any reference link or any sample code available?
Thnx in advance...
Most people mistake the one instance of AVAudioPlayer as the unit that plays the sound directly, but it doesnt. Mixing is done by the OS, not by the instance of AVAudioPlayer.
With other words:
No one says you can't have more then one AVAudioPlayer.
Create one for you background and let it play. Create another instance of AVAudioPlayer for you recorded sound and let it play. Voila
Related
Is there any way to add more than 1 video player in a single View? I am getting the .m4v list from server adn have to display that much videos in single page.
It doesnot matter if I play 1 video at a time but which ever video I want must play there itself.
So the videos are placed one below other.
I have tried using mpmoviecontroller but it's drawback is it can have only one instance in the whole applicaiton So if i try to alloc 2 players in a view then the first one does not work and only one player works..
Is there any legal alternate way for the same?
MPMoviePlayerController will allow multiple instances, but only one of them can be playing their movie at any given time.
Please check the link : http://developer.apple.com/library/ios/#documentation/mediaplayer/reference/MPMoviePlayerController_Class/MPMoviePlayerController/MPMoviePlayerController.html
I used AVPlayer class (which also MPMoviePlayerController uses under the hood) to successfully play multiple videos from multiple source.
The process of using it is more involved than MPMoviePlayerController, but I would say it is definitely worth to look at if you want some customized behavior in your player. The official programming guide is a good start.
Is it possible to play some audio files while my movie is playing. I don't want it to interrupt or pause he movie. Just the audio to play at same time at various predetermined points.
Many Thanks,
-Code
You shouldn't have any problems with it.
If you want to synchronize or delay these players you should use
the code they provide in AvAudioPlayer Class Reference using
playAtTime: method.
Sadly MPMediaPlayback protocol doesn't provide the same method
so exact synchronizing with video is a bit harder task.
EDIT: RoLYroLLs mentions using MPMoviePlayerLoadStateDidChangeNotification to achieve this here and this approach seems promising.
Use two or three Audioplayer at same time . Play that audio when u need it
I am developing an application for recording audio and play it with a beat in background and also save it for further use, right now i am just able to play it with background using two instances of AVAudioPlayer but when i am going to save them i had no idea how to because these are two different sound file ,now only way to save it is to merge both file but i had no idea how to mix them. Ideas and Suggestions are welcomed.
i did the audiotask, just check that and tell what help you what you need
In my application, I have list of Buttons when i click on one button corresponding music will be played. I want to record the sounds coming while playing the audio using avaudioplayer. But when i start recording while playing sounds nothing is recorded, Is it possible to record the sounds from avaudioplayer.
Thank You.
You might like to check-out this thread.
Please I know how to play a sound in AVAudioPlayer but I would like to know how to give it a list of on-disk files to play one after the other (play list)
Anyone has any idea?
You have to manage this by yourself, using the 'audioPlayerDidFinishPlaying' method to know when the current song is over, and when to start a new one.
The Apple "AddMusic" sample program does exactly this, setting up a playlist of audio files using MPMusicPlayerController and AVAudioPlayer to do most of the work.