Digital audio from a sound card

AI Thread Summary
Audio programming involves understanding how computers process and reconstruct audio through sound cards. The typical method involves sampling an audio signal in the time domain, where each sample represents voltage levels at discrete intervals. This data is stored and used to output a voltage signal, requiring a digital-to-analog converter (D/A) for playback. While FFT may be used for compression and processing, the final output to the sound card is primarily a time domain representation of the audio signal. Filtering is also necessary to smooth the output and eliminate frequencies beyond human hearing.
FrankJ777
Messages
140
Reaction score
6
I would like to do some audio programming for a school project, but I'm not sure how a computer processes audio and reconstructs it in a sound card. I've had a signal processing course that covered standard DSP topics but I'm not sure when or how they are applied to acquire, store, and reproduce audio through a sound card. In trying to find a functional explanation I usually see it explained as sampling a time domain signal, storing the samples, and then reproducing audio wave in the time domain by using the sample to represent a voltage at discrete time intervals. But use of the FFT is always mentioned, but I'm not sure how it all fits together. So I have two "theories" about how it's accomplished.

a) A audio signal x(t) is sampled, which represents signal voltage levels at discrete time intervals x[n]. The time domain samples are stored in memory. Then the time domain samples are used to output a voltage signal by setting a voltage level to the value of the sample x[n] at time intervals of the sampling period.

b) A audio signal x(t) is sampled as before. The samples x[n] are then passed to an FFT then the frequency domain values X[k] are stored in memory. Reconstruction is accomplished by oscillators in the sound card which each oscillate at a discrete frequency (for time intervals of the sampling period) at the magnitude indicated by the value of the sample X[k].

Or, in other words. When you give data to a sound card to output audio, is your data a time domain representation of the signal where each successive data value represents the magnitude of the wave at a time interval x[n], or does the data you give sound card represent discrete frequency values X[k] at time intervals.

I know this question is verbose, but I think the easiest way for me to gain understanding is to explain what I think is going on as I understand, and let somebody else tell me where I'm looking at this wrong. I hope someone can straighten me out on this.

Thanks.
 
Engineering news on Phys.org
The typical setup is a). During the conversion from digital back to analog (D/A), you will also need some sort of filter to smooth out the steps in your output which occur at the sampling/reconstruction frequency.

If lossy audio (or video) compression are performed, an FFT (or a subset, usually) is performed on the sampled stream and then appropriate processing is performed. Decompression requires the inverse FFT and then you do the same D/A conversion as before.
 
Or, in other words. When you give data to a sound card to output audio, is your data a time domain representation of the signal where each successive data value represents the magnitude of the wave at a time interval x[n], or does the data you give sound card represent discrete frequency values X[k] at time intervals.

The sound card has a digital to analog converter in it and the outputs are generated at the same rate as they were sampled.
The outputs represent the instantaneous amplitude of the original sound and, after some filtering to get rid of components above human hearing, the result is presented to an audio amplifier.
 
Hi all, I have a question. So from the derivation of the Isentropic process relationship PV^gamma = constant, there is a step dW = PdV, which can only be said for quasi-equilibrium (or reversible) processes. As such I believe PV^gamma = constant (and the family of equations) should not be applicable to just adiabatic processes? Ie, it should be applicable only for adiabatic + reversible = isentropic processes? However, I've seen couple of online notes/books, and...
I have an engine that uses a dry sump oiling system. The oil collection pan has three AN fittings to use for scavenging. Two of the fittings are approximately on the same level, the third is about 1/2 to 3/4 inch higher than the other two. The system ran for years with no problem using a three stage pump (one pressure and two scavenge stages). The two scavenge stages were connected at times to any two of the three AN fittings on the tank. Recently I tried an upgrade to a four stage pump...
Back
Top