Record samples being played with OpenAL - iphone

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.

Related

iOS: How read playing a real-time music?

I would like to create an audio visualizer, and I had a question:
How can I get the part of the music that plays at a time on the device?
P.S. Example "aurioTouch" similar to what is necessary, but it processes sound from a microphone, and I needed from the device.
If you want to do things with real time audio, then you should have a look at Core Audio

Playback and Recording simultaneously using Core Audio in iOS

I need to play and record simultaneously using Core Audio. I really do not want to use AVFoundation API (AVAudioPlayer + AVAudioRecorder) to do this as I am making a music app and cannot have any latency issues.
I've looked at the following source code from Apple:
aurioTouch
MixerHost
I've already looked into the following posts:
iOS: Sample code for simultaneous record and playback
Record and play audio Simultaneously
I am still not clear on how I can do playback and record the same thing simultaneously using Core Audio. Any pointers towards how I can achieve this will be greatly appreciable. Any pointers to any sample source code will also be of great help.
The RemoteIO Audio Unit can be used for simultaneous record and play. There are plenty of examples of recording using RemoteIO (aurioTouch) and playing using RemoteIO. Just enable both unit input and unit output, and handle both buffer callbacks. See an example here

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

iPhone - AudioToolbox and recording

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.

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.