Create AAC file programmatically in iOS? - ios

I am creating an iOS app that can play instrument sounds.
The user can play and record his melody.
Now, I need some help to export his record into an AAC file.
Any idea ?
Thanks ;)

Here is a great project that does exactly that by Michael Tayson

you could think about starting with LPCM and then convert this down to AAC.
Have a look at Apple's 'Audio Converter Services Reference' specifically the following:
AudioConverterFillComplexBuffer

Related

Can I extract or convert a video file to audio?

I have a case where i need to get audio out from video file. Is this possible in iOS ??
I need only the output file as an audio any type. I have the video file in my documents directory which I record earlier in application.
1.Convert Video Reverse
2.Extract audio from a video file
3.Add Audio & Video Together
Download Code From Here
may be helpful to you.
Yes, it can be done. See Extract audio from video file for ideas.
Extracting is probably the more accurate term.

Convert .mp3 file to .wav or .caf in code in iOS

I am retrieving an MP3 file from the iPod Library and saving it to the application's Documents directory. I need to convert it to .wav or .caf so that I can use OpenAL or any other library to change the pitch of the audio.
Can this be done? Any assistance with code will be greatly appreciated.
Take a look at the AVAssetWriter class. Also, check out this link, its not exactly what you want, but its a start.
http://www.subfurther.com/blog/2010/12/13/from-ipod-library-to-pcm-samples-in-far-fewer-steps-than-were-previously-necessary/
Note that it might be difficult to gain access to the user's actual file as that would require reaching out of your app's sandbox - something Apple doesn't allow.

MP3 playback issues with DirectX when MP3 has album art encoded

I'm using the Clootie DirectShow9 headers with Delphi 2007. I created a wrapper component that plays audio and video. All is good until I get an MP3 that has album art encoded in it. The mp3 files like this just will not play. I do not get an error message from my code when I call pMediaControl.Run;. pMediaControl is IMediaControl. They just do not start playing. I many other MP3 files that are not encoded with album art and they play fine. There must be something I'm missing but I cannot figure it out.
These art encoded mp3 files play OK in WMP and Winamp on the same PC.
Can someone shed some light on this for me?
Thanks
I have also hit that one (or was it VFW_E_UNSUPPORTED_STREAM).
It's because the metadata is currupted, or when the image-size is very big.
(editing the Tag in Winamp sometimes helps)
I read a little about Media Foundation and it and look like it is available only on Vista and up. I need Windows XP support for now.
I'm going to use the bass.dll and the delphi wrapper unit. I've done some testing already and all my problem mp3 files play with bass.
I wanted to stay away from using a third party component / dll but my time to finish this project is getting slim.
http://www.un4seen.com
The download includes many Delphi samples. So far the library has worked great.

Buffering in Blackberry

Currently I am working on the application for which I have to use audio buffering. Please tell me how I can achieve this task as I am trying myself.
read this Buffer and play streamed media
Also, there's a great example in the Blackberry SDK, which shows buffered playback of a MP3 file.
Take a look in the 'samples' folder of JDE/Eclipse Plugin.

How to play a downloaded mp3 file?

I have downloaded a mp3 file from a server successfully, but the problem I encountered is, I don't know how to play that file.. Should I use AVAudioPlayer or AudioQueue to play the file?? I will be appreciate if you could post some sample code here.
Both AVAudioPlayer and the Audio Queue API can be used to play MP3 files. The AVAudioPlayer is well documented and has a lot of sample code available. So why not give it try first and if that does not work, post a more specific question here.

Resources