Tutorial to record audio on the iphone? - iphone

could anyone explain how to record audio on the iphone. I already read the sampleProject of the developer-page. Moreover the documentation didn't quite answered my question.
It would be great to have a kind of checklist how to implement a simple audiorecorder.
Thanks!!!

There is already one as a sample app.
Check "Speak Here" that app records and play sounds. Is a low level sample for CoreAudio.Framework
But if you prefer something newer (and probably better for your needs) check for AVFoundation.framework I am sure there are new APIs in iOS 4.0 that allow to capture sounds like AVCapture, AVInputDevice, etc.
Cheers

Related

How to copy a song from iPod Library to app?

In my application, I want to copy a song from iPod Library.
How can I do that?
Yes. It is possible, but hardly practical, to access raw song data. What you do from there is up to you. Here is a lengthy and detailed description of the process: http://www.subfurther.com/blog/?p=1103.
EDIT: Please be aware of App Store guideline 9.1 before making use of this technique. These guidelines require a developer login, so I've removed them from my post.
I think you can't.
Apple should not allow this !
Edit : see iPod Library Access Programming Guide but I don't think you can access to file. Just metadata.
if iMovie can do it, and they say it is done with all public API's they are in direct conflict with themselves...
Maybe this gives them wiggle room to allow you to post iPod library content to YouTube, since YouTube handles the appropriate detection of sensitive audio. This is sticky but here is the final solution you should learn from to do the job...iPodLibrary Music to PCM Samples revised
Checkout this it will helps you
https://github.com/davidcairns/MediaPlayerDemo

iPhone SDK: Is it possible to process audio file from local library

Well, I will try best not to make it as a 'I just want the code' question...
I'm recently working on a project which requires some audio signal processing from local music files (e.g. iTunes Library). The whole work includes:
Get the PCM data of an audio file (normally from iTunes library); <--AudioQueue (?)
Write the PCM data to a new file (it seems that Apple does not allow direct modification on music tracks); <--CoreAudio(?)
Do some processing and modification, like filters, manipulators, etc. <-- Will be developed in C++
Play the processed track. <--RemoteIO
The problem is, after going through some blogs and discussions:
http://lists.apple.com/archives/coreaudio-api/2009/Aug/msg00100.html, http://atastypixel.com/blog/using-remoteio-audio-unit/
http://osdir.com/ml/coreaudio-api/2009-08/msg00093.html
as well as the official sample codes, I got a feeling that the CoreAudio SDK allow us to apply audio processing only on voice demos recorded from Mic.
My question is that:
Can I get raw data from iTunes library tracks instead of Mic input?
If the first question is 'No', is there a way to 'fool' the SDK to let it think it is getting data from Mic input, not from iTunes? (I have done some similar 'hacking' stuff in C# before XD)
If the whole processing just doesn't work, can anyone provide some alternative ideas?
Any help will be appreciated. Thank you very much :-)
Thanks.
Just found something really cool yesterday.
From iPhone Media Library to PCM Samples in Dozens of Confounding, Potentially Lossy Steps
(http://www.subfurther.com/blog/?p=1103
And also a class library by MIT:
TSLibraryImport: Objective-C class + sample code for importing files from user's iPod Library in iOS4.
(http://bitbucket.org/artgillespie/tslibraryimport/changeset/a81838f8c78a
Hope they help!
Cheers,
Manca
1) No. Apple does not allow direct access to PCM data of songs. Otherwise you could create music-sharing apps, which is not in Apple's interests.
2) No. Hacking and getting approved is impossible due to Apple's code approval mechanism.
3) The only alternative I could think of is that you have to do the processing part on PC/Mac and then transfer it to the iPhone. Or you would have to store the files in your own applications folder - you should be able to load and process these via CoreAudio.
I know this thread is old but... did this work for you, Manca? And did this app get approved?
EDIT: just discovered the AVAssetReader class, introduced since iOS 4.1, should help

Recording sounds created within an iPhone app

I'm new to programming in Objective-c and the iPhone but I am working on an app to teach myself. I have been trying to figure out how to record sounds on the iPhone. Apple provides excellent documentation for recording from the microphone with AVAudioRecorder but I want to record sounds made by my app, or even just record sounds when buttons are pressed (button is pressed, certain audio gets recorded).
I have no clue how to do this and can't seem to find anything that would help me along this path, only microphone stuff.
Can anyone share ideas or code that would make this possible?
Thanks
Once you move beyond the convenience classes like AVAudioRecorder, you've got a lot of studying to do.
I would start with:
Getting Started with Audio and Video
Multimedia Programming Guide:Audio
Core Audio Overview
Audio programming is a very large and complex subject. If you want to customize, be prepared to spend some time learning it.
I've made a sample app that records sounds/audio and has a playback. Hope this helps! https://github.com/casspangell/AudioMic

iPhone AVAudioRecorder Guide?

Can anyone point me to a tutorial or discussion that provides a clear-cut, full explanation of how to use the AVAudioRecorder method of recording audio in iPhone apps? Although I'm new to iPhone programming in general, I do have a basic understanding and yet all my attempts to use AVAudioRecorder have failed miserable. Much appreciated!
Sample code and documentation can be found here. You can fill in the blanks with searches here on StackOverflow. If you haven't started with Audio, it's best to look at the Apple docs and example code first. Then have a look at other sources. This is where a good book on iPhone development comes in.
To use AVAudioRecorder you first need to enable the AVAudioSession and init and start AVAudioRecorder, here's my example of how to set everything up and measure the level of "loudness" for instance http://www.mikitamanko.com/blog/2017/04/15/swift-how-to-get-decibels/

Best way to stream MP3 from an iPhone app?

I am working on an application that will stream music from a server of mine from an iPhone application.
This is my first iPhone app so I am a bit confused :
What would be the best way to do
this?
Is there something already built in
that I could use, like a MP3 player
that I just need to point toward the
correct server?
Do I need a streaming server to do
so?
I'm relatively new to Objective-C/Cocoa (touch), but I have read an article on the cocoawithlove site titled "Streaming and playing an MP3 stream" and tested the sample code on my iPhone and it works perfectly. I don't know about the licensing or anything, if you would be able to use it, but I'm sure someone or even you can figure that out.
Sorry again for not being able to provide any more information or even a link. This is my first answer on SO and cannot post hyperlinks :(
(edit: Here's the link: Streaming and playing an MP3 stream)