This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
2 mp3 sounds at the same time in iphone?
Hi i am creating test application where i am using two mp3 audio file.One for the background music and second file play when user clicked the button.I am using AVAudioPlayer for both and the background music is playing in appDelegate class but i am handling it from the ViewController class.Please if anybody know about this problem please help me out.
You cannot play two compressed formats simultaneously. Try converting one of the files to AIFF, CAF or some other uncompressed format.
Related
I have the following needs to audio: it needs to be able to play at least 2 local audio files and it need to support playing in the background, so the user can close the app and multitask while the audio still plays. What of the 2 options are the best bet?
AVAudioPlayer is your best bet. As mentioned in the comment "AFAIK MPMusicPlayerController is used for local files inside the iPod Library."
Having said that, can you please give more details about your problem?
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
AVAudioPlayer: How to Change the Playback Speed of Audio?
I want to control the speed of the audio played by AVAudioPlayer, So is it possible to control the speed of the audio from slider controller?
I got solution with the help of OpenAL only. With the help of SimpleAudioEngine n CDAudioManager I have done it. referance link : http://www.learn-cocos2d.com/api-ref/1.0/CocosDenshion/html/interface_simple_audio_engine.html
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
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
I want to merger an image file and an audio file.
I have UIImage object in which I have my image.
I have also CAF audio recording of 4-5 seconds.
Now, I would like to create a movie file with image repeating for the length of audio.
Using which class/methods can I do this? Any Idea?
Thanks in Advance.
The answer to this question should help you:
How do I export UIImage array as a movie?
THe only difference is that in the question they use several UIImages, you only need to repeat the same one.
Good Luck