I have created a wav file (sampling rate of 44.1kHz at 32-bit floating point precision) consisting of 44.1k samples at 0.0 followed by 44.1k at 1.0. After which the file is played out from line-out using Media Player Classic and looped back into line-in. The resulting waveform is captured and inspected using Audacity.

The output waveform goes from 0.0 to 1.0, holds it there for a number of samples and some how "decays" back to 0.0. What is going on? And how do I recreate the desired step waveform where it will persist at 1.0 for the second half of the waveform?

The brand of the sound card used in question is Realtek, PC is an Acer TravelMate 4720.

PS: This may seems like a PC question but I suspect it has more to do with sound electronics used on sound cards.


This sounds like there is some DC Bias removal taking place. In general with audio you want your average voltage should be 0v. This is because of how speakers work. 0v would mean that the speaker is at rest. In order for the speaker to sound normal you want it to be able to go back to its resting position.

In order to achieve this, sound cards will remove any DC offset in order to set the average voltage to be 0. This can be done both digital and analog. If it is done digitally there may be some settings with your driver to disable DC Bias adjustment. If it is done analog, you will have a tough time getting rid of it.


Audio codecs in PCs have digital high pass filters (at least the ones I know) with cutoff at some low frequency like 1 Hz, while your signal is only 0.5 Hz, and this is what deforms it. If you use it for some kind of signaling, you will have to move to higher frequencies. I don't think there is a way to disable the filter unless you write your own driver.

As Kellenjb says, the filter is there to remove the DC offset from the signal.


As others have pointed out, you have a high pass filter in the way. This may be in the DSP logic generating the output, but it's probably also in the form of a DC-blocking capacitor.

If you trace the circuit from the output jacks back to whatever IC is functioning as the DAC, you maybe be able to find and shunt the capacitor.

Depending on what kind of output you need, another trick might be to build yourself an AM radio... ie, you could use a diode and a capacitor (from signal to ground) to build an envelope demodulator and lowpass filter. You then modulate your signal by multiplying your samples by a carrier signal consisting of 1, -1, 1, -1, etc. There will be some distortion, but you should be able to get low frequencies out.

Also be aware that in using the audio input as a storage scope, you run the possibility that the problem is on the input instead, or there in addition to on the output.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.