 <p>The usual problem when trying to use an audio signal as digital signal input is that it is <a href="http://blog.faberacoustical.com/2010/ios/iphone/iphone-4-audio-and-frequency-response-limitations/" rel="nofollow">high-pass-filtered to avoid offsets</a> (long term pressure changes which could destroy the dynamic range of the soundcards Analog-to-Digital converters). This means you will get only the changes of the digital signal (like "clicks"). Actually you will be better of the higher frequency your signal has, but it will be non-trivial to process it well then (this was what ordinary modems did very well).</p> <p>If you can control the digital signals sent as sound (or to the microphone jack), make sure they are modulated the signal with one or more tones, like a morse transmitter or modem. Essentially you want to use your iPhone as an <a href="http://en.wikipedia.org/wiki/Modem#Acoustic_couplers" rel="nofollow">Aucoustic Coupler</a>. This is possible, but of course a bit computationally expensive considering the quite low bandwidth.</p> <p>Start by using some dirt simple modulation, like <a href="http://en.wikipedia.org/wiki/MDC-1200" rel="nofollow">1200-1800 Hz</a> and make an FFT of it. There's probably <a href="http://www.matthew.at/mdc/" rel="nofollow">some reference implementation for any sound card out there</a> to get started with.</p> <p>There have been some cool viruses recently that was said to be able to jump air-gaps, they used similar techniques as this one.</p> <p>If you still really want a DC (or slowly changing digital signal), check out a <a href="http://lea.hamradio.si/~s57uuu/scdsp/CheapChop/cheapchop.htm" rel="nofollow">solution using a separate oscillator</a> that is <a href="http://en.wikipedia.org/wiki/Amplitude_modulation" rel="nofollow">amplitude-modulated</a> by the incoming signal</p>