I am using AVAudioRecorder for recording sound in my ios app. I want that if user moves the UISlider object to 2 seconds and press Record button then after saving the recording file and playing it, user should hear the recording after a pause of 2 seconds. How can I achieve this functionality? Can anyone please help?
Best Regards
You can add 2 second silence (please consider slider value is 2) to your Audio file starting section
To do this please go through this link
The below links also may help you to achieve the goal.
avaudioplayer-append-recording-to-file
trim-audio-with-ios
Related
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 have 25 images and a sound file of 2 seconds.
I am ale to play the sound and playing the animation but the synchronization is not getting between sound and the animation ...
Can any one please help me how to synchronization the animation with sound...
There are 25 frames and the sound file duration is 2 seconds...
Can any one please help me how to synchronize the both ......
Whether the animation is manual triggered by means of swiping or it s automatic ?
If it s manual like in the case of swiping you can call the sound file to play whenever the animation is (manual like swiping)done.
Post some of your code. Then we could help you.
See my answer to Animation iOS with sound file for a step by step on how to play a sound with AVAudioPlayer and then blit a specific image to the screen at exactly the right time.
I have been working on an Audio Application where a user can record and play the recorded audio file. In my app during recording a user can pause the recording and play it to listen what he has recorded and then again he can continue the recording.
So now my question is that if a user have recorded a 20 seconds audio and when he plays the audio and wants to resume recording from over 10 seconds overlapping/discarding the next 10 seconds audio. ?
I have looked into the AVAudioRecorder documentation and there is not property to set the duration of the recorder to start recording from specific time. So please someone tell me if it is possible or not. ?
Thanks
Maybe there’s an easier solution, but you may want to look at AVMutableComposition. You can easily create an empty mutable composition, insert the recorded sound into an audio track and then edit the track as needed – delete segments, add another recording, etc.
i'm using AVAudioRecorder and AudioQueueServices to record audio from the iphone's mic but I want to auto record the sound once it is detected so theres no need to press on a record button
I've looked at a tutorial about the AVFoundation:
www.iphoneam.com/blog/index.php?title=using-the-iphone-to-record-audio-a-guide&more=1&c=1&tb=1&pb=1
and also a tutorial that explains how the iphone mic can detect sound levels, i've tried adding the two tutorials together but i cant get the code to work at all
Can't figure out what to do and i'm not sure if i'm taking the wrong approach
Any advice?
Thanks
Check out this tutorial: http://mobileorchard.com/tutorial-detecting-when-a-user-blows-into-the-mic/
I got something similar working using the above tutorial. I have one AVAudioRecorder monitoring the mic's volume and another that records the mic's input when a certain threshold is reached.
Does anyone knows how to play a portion of a sound file on the iPhone?
Using the SDK, or any other library (Cocos Desnhion...).
I know how to play an entire sound, but not an exact portion of it (eg. from 2,5ms to 6ms).
Thanks!
Vincent
AVAudioPlayer has a currentTime property. Set it to start playing the file at a specific time mark and then watch its progress to stop playing when it reaches a desired mark.