iPhone - AudioToolbox and recording - iphone

In my application, I'm playing an audio using audio toolbox framework.
When its playing, how can I record the same?
I tried using AVAudioRecording by setting audio session "Play and Record". But when recording, the volume of the audio being played is getting reduced.
How can I use Audiotoolbox framework itself and record the audio?
Can some one help me?

You can't use the AVAudioRecorder to record itself. You can use the Audio Queue or the Audio Unit RemoteIO APIs, and capture the audio samples you are putting in the output buffers to play as you play them.

Related

Record iphone System or audio player sound

I am developing an app module in which i am doing audio recording with also video recording.
but i want to record only device intrnal playing sound , not the device external voice.
If any advise or suggestion to got it..!!
I'm not sure but maybe you can use buffers to write them into a file Audio units or Audio Queues without using mic

Is there any issue if two avaudiorecorder recording-iphone

I want to record audio from user and play it back.
This I have implemented.
My need is to capture the audio that app produces. Can I record the audio using avAudiorecorder.
Is there is any problem for recording audio using two simultaneous recorders

Playing sound while recording

Is it possible to play back a sound while it is recording it, live?
I found this question/answer which shows how to record sound with AVAudioSession.
If so, at what should I be looking at? Can AVAudioSession play sound as well?
(Basically like an amplifier, outputting the sound as it comes in)
You can use either the Audio Queue API or the RemoteIO Audio Unit for streaming audio record and play. The RemoteIO unit will have a much lower latency. Either way, you should initialize your audio session and set it for kAudioSessionCategory_PlayAndRecord.

Is there a way to record device audio on the iPhone?

AVAudioRecorder allows the recording of external audio. However I wish to record the audio made by my application (through numerous AVAudioPlayers), is this possible on the iPhone?
If you want to record the sounds your iOS app makes, you have to use a much lower lever API, such as Audio Unit RemoteIO, or Audio Queues with raw PCM audio samples.

Record samples being played with OpenAL

I am playing 9 loops simultaneously using OpenAL on iOS. In order for the loops to be 100% synchronized they are started playing on different threads. Any pointers/tutorials on using OpenAL to record what is being played. Wil I encounter issues recording given I am using different threads?
OpenAL on iOS doesn't support audio recording. You'd need to use audio units to play the audio and route it to both the speakers and a file.