How to do this on the iPhone? - 1

To get a direct audio input through the headphones jack on the apple iPhone 4?

YEah.

I discovered how to get an audio input into the iPhone the other day via this app.

iRock

I always figured it would work, but saw no documentation of it anywhere on the web. I guess it is a feature that developers officially aren't able to develop for yet. Apparently this will change when iPhone OS 3.0 is released.

On the "cable" page, there's an explanation of how to get this app to work with a standard AV cable. I went to Radioshack, bought an AV cables and it works. I bought a standard one, and it turned out red is input, yellow is right output and white is left output.

Thus the 1st headphone guitar amp simulator is available. It sounds pretty bad, but at least it exists.
The audio input function is great for tuning electric guitars and basses, especially with the strobe tuner app. It also works for direct recording to any of the 4 track apps, but you can't monitor the input. Anyway, cool things await the iPhone when this function is officially supported.

First you need TRS Jack it look something like this
http://www.amazon.com/...008O58FUA/

Then you need something like iRig:
http://www.amazon.com/...003T1WCBW/

Then you need to connect the TRS Jack to iRig and you need a recording software.