In my app the user plays a sound by pressing a button. There are several buttons which can be played simultaneously. The sounds are played using AVAudioPlayer instances. I want to record the output of these instances using AVAudioRecorder. I have set it all up and a file is created and records but when I play it back it does not play any sound. It is just a silent file the length of the recording. Does anyone know if there is a setting I am missing with AVAudioPlayer or AVAudioRecorder? Thanks
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- how do you prevent page scroll in textarea on mobi
- Custom UITableview cell accessibility not working
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- Unable to process app at this time due to a genera
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- Open iOS 11 Files app via URL Scheme or some other
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- Can not export audiofiles via “open in:” from Voic
- XCode 4.5 giving me “SenTestingKit/SenTestKit.h” f
Was facing the same problem. Solved the problem by setting the AVAudioSession category to AVAudioSessionCategoryPlayback mode. This is my working code:
Also make sure that the audio recording has been finished successfully by implementing:
And check that you have added
<AVAudioSessionDelegate,AVAudioRecorderDelegate,AVAudioPlayerDelegate>
in your interface declaration.
Hope it helps, at least to look for something else.
I'm having the same issue here, I'm trying to record a mix of different sounds played at different times with a main track playing, what I found is that AVAudioRecorder records only from the mic, so it would work.
What I found, still have to read doc and test it, is the Audio Converter Services, I think that may work, but I have just read a few lines.
Once again, sorry to tell you, but you're looking the wrong way, I hope my answer helps
It is not possible to record AVAudioPlayer output as input to AVAudioRecorder for recording. You can use audio buffer to store played files and save it to a file.
It would probably be easier to help if we saw your code.
You should also check out the following link to see if you have your AVAudioRecorder setup correctly: How do I record audio on iPhone with AVAudioRecorder?
Although that link shows how to setup a recording from the mic, it might still be helpful to you.