Record using OPEN AL - openal

Im trying to record using open al, Ive searched around and have only found examples of people recording from the mic.
I want to record sounds that openal is playing.
Could someone point me in the right direction?
Thanks

This isn't really an OpenAL question from what I see. I don't believe OpenAL has any ability to go from the buffered data back to .wav file. You would need to do something like in the below thread.
Saving audio byte[] to a wav file

Related

How to record user generated sound output on iPhone

I have a series of sounds that a user will play, rearrange, and edit etc. while using my app. When the user is finished, I want them to be able to save their work and record it to an mp3.
I don't want to play it through speakers and record it with the mic since that will result in low sound quality and interference. I cannot think of any ways of doing this that doesn't require extra hardware and/or a computer.
How can I do this using just their device?
Well, I would say it cant be done with AVFoundation.
My suggestion is to use Audio Units, and transform all your interactions to an audio graph. at some point you set a render notify on the RemoteIO so every time it renders sounds to the speakers you get a callback where you can write it down those frames/packets/data into a file.
I will probably suggest to use AAC(m4a) over MP3. I am not very fond of MP3, and to be honest as far as I know the sdk does not provide encoding to MP3, probably due to licensing issues. I could be wrong though. Check this sample code below, probably the best sample code you will ever find on Audio units on the web.
AudioGraph by Tom Zic

Is it possible to convert audio file with some music notes?

I have a music file with a particular tone(music.mp4). I want to convert existing sound file (speech.mp4) into the tone which is specified in music.mp4. Its like converting a speech into some particular tone. I do not want to play both files simultaneously. I want to convert source file with help of some music file. So, output file will be converted file.
Is it possible? I searched for Audio Unit Hosting and Multimedia guide. But do not get any clue.
Thanks in advance.
The answer is: it sounds (no pun intended) like it would be possible with the iOS. You just need to find someone who knows how to program that specific functionality. I do not know why you would think to find the answer in the Apple Docs. I want to know if it's possible to program music that plays backwards. I want to know if I can program a sound that converts my words into something my dog understands. I can't imagine the documentation could possibly cover everything everyone ever wants to program an iPhone to do.
There are no iOS public APIs for frequency analysis of audio files. You would have to write your own DSP code for that. The AVFoundation and Accelerate frameworks have some audio file conversion and math functions that may help, but that is only a small portion of the code needed.

how to play MID sound file in iphone?

I have implement game application in which i want to play mid sound file in the background.How it possible?
The short answer is there is no easy way. When this question came up before the best recommendation was to try porting TiMidity++. This appears to be difficult.
A more iPhoney solution would be to convert your midi file into an audio file using something such as
Easy-Pro Midi to Audio Converter 1.3
and then playing the the audio file normally in your app. This may have the downside of enlarging your app size.

Convert .m4r/.mp3 to .caf/.aiff in iphone app

As of right now I am using ffmpeg to convert from .mp3 --> to .aiff but I would like a native way to do this in xcode but i do not understand how to use AudioConverter.h in AudioToolbox soo if someone could please help me I would be really appreciative.
Thank You
Enea
ExtAudioFile can do a fantastic job of this. One reason to take some compressed formats like MP3 and convert to PCM is that there is much less of a latency when playing the sound. An MP3 sound effect, for example, can take close to a second to start playing back, when the same sound in PCM could start almost immediately. I know since I am converting my sounds to PCM at launch time and eliminating the delays I was plagued with.
Go download iPhoneExtAudioFileConvertTest and you will find everything you need to do your own conversions
I think the real question is why would you want to? The iphone and AudioQueue has full mp3 support for playback and mixing. I know of no way to do this on the fly in the iPhone. It is a fairly processor intensive task and I doubt you could do it efficiently on the iPhone anyway.
You can use ExtAudioFile to open and convert the file to CAF with PCM data.

AudioQueueOfflineRender questions

I have a few questions about this after reading the iPhone documentation on it:
Does this take the audio being played and save it to a buffer so it can be written to a file?
If so does the audio being played have to be played using a playback audio queue or can it be played via a higher level class such as AVAudioPlayer.
Can anyone point me in the direction of some sample code or further help than the docs.
Thanks
Yes
Pretty sure you need to use a/the playback audio queue.
This Apple QA points to a file called aqrender.cpp which implements point 1.