how to compress audio file in iphone application - ios

i am developing a new application,for that app i need to compress the audio files.i dono how to do that.can any one help?
Thanks In Advance..

The best choice of audio format depends on how you are using the audio; for example, is it for a short alert sound? Or is it a longer piece which plays for some time? What sort of quality is required?
It's quite likely you will need to use AAC, which is one of the most common compressed audio formats supported by iOS.
You should find all the answers in the documentation:
Core Audio Introduction
Playing Audio

Related

Capturing PCM data from AVPlayer playback of HLS

We are trying to use capture the PCM data from an HLS stream for processing, ideally just before it is played, though just after is acceptable. We want to do all this while still using AVPlayer.
Has anyone done this? For non-HLS streams, as well as local files, this seems to be possible with the MPAudioProcessingTap, but not with HLS. This issue discusses doing it with non-HLS:
AVFoundation audio processing using AVPlayer's MTAudioProcessingTap with remote URLs
Thanks!
Unfortunately, this has been confirmed to be unsupported, at least for the time being.
From an Apple engineer:
The MTAudioProcessingTap is not available with HTTP live streaming. I suggest filing an enhancement if this feature is important to you - and it's usually helpful to describe the type of app you're trying to design and how this feature would be used.
Source: https://forums.developer.apple.com/thread/45966
Our best bet is to file enhancement radars to try to get them to devote some development time towards it. I am in the same unfortunate boat as you.

Record application audio ouput on iOS

I've read some information about recording audio you play on the application (with buttons), but haven't really understood the basics.
What do I need? Can I record audio being played in the application with Remote I/O Unit?
Are there any samples I could study?
Thanks
I want to give you a link to Apple's sample app as a comment. But SO does not allow me because I do not have 50 reputation. So here it is. Good luck.

Many types of video types not working with MPMoviePlayerController?

I am finding that there are many types of files that just don't work with MPMoviePlayerController in iOS 5.1. They include webm, ogv, flv (of course), mpeg2, and a few more that I forgot. Is there any way to improve the chances of playback of these files, other than converting them?
Thanks.
iOS does not suport all the fileformat/codecs. you can refer to to know the supported formats
What are the video formats supported by MPMoviePlayerController on the iPad?
other options would be writing your own application to decode n display (but its not practical)

what audio compression Algorithm to use in iPhone App?

I am trying to record audio using an iPhone app and send the audio file through Mail. I need to compress the file before sending. what audio compression Algorithm to use in iPhone App?
It depends very much on your application.
Do you need loss-less compression, or can you afford losing some audio quality?
How fast to you need the file transfer to be?
How fast do you need the compression process to be?
Depending on the answers to these questions, you can choose one of the formats available in iOS.
You can read more here:
http://developer.apple.com/library/ios/#documentation/MusicAudio/Conceptual/CoreAudioOverview/Introduction/Introduction.html
http://developer.apple.com/library/ios/#documentation/MusicAudio/Conceptual/AudioQueueProgrammingGuide/AQRecord/RecordingAudio.html#//apple_ref/doc/uid/TP40005343-CH4-SW4
First choose the right bitrate. Typical bitrates for different purposes:
32kbit/s: AM Radio quality
48kbit/s: Common rate for long speech podcasts
64kbit/s: Common rate for normal-length speech podcasts
96kbit/s: FM Radio quality
128kbit/s: Most common bit rate for MP3 music
160kbit/s: Musicians or sensitive listeners prefer this to 128kbit/s
192kbit/s: Digital radio broadcasting quality
320kbit/s: Virtually indistinguishable from CDs
So if audio contains only speech 48 kbit/s is usually enough. For music 128 should be ok.
Second - you should use good compression codec. For detail information please check this link http://soundexpert.org/encoders-48-kbps but usually you should use AAC codec.
Other options (sample rate, bit depth, etc.) are not so important and usually you should leave them default.

Playing mp3 with delphi

Which component to use to play mp3 files from streams/files and also to know the lenght in seconds of that mp3 stream?
You could use the Bass audio library.
http://www.un4seen.com/
Search for "MP3" on the 3D Buzz site. They have a series of video tutorials that walk you through the creation of your own MP3 player in Delphi using this library. Free membership required.
http://www.3dbuzz.com
You can also use the components at www.mitov.com which has an Audio suite that can handle this type of file.
try DSPack which are set of Components to write Multimedia Applications.
I use NewAc components for audio conversion and filtering, it can play MP3 and several others formats.

Resources