Audio Compression and Codecs

Started by
2 comments, last by Axiverse 19 years, 10 months ago
How would you go about writing a audio (and maybe even video) codecs and file formats and how do codecs work? (is there a stream in and a wave stream out? )
Advertisement
You''ve asked a pretty loaded question. Designing good audio/video formats is not at all simple. You can start with very basic encoding, like PCM, and move on to more complicated stuff involving FFTs, acoustics analysis, and other fun academic stuff. Then there''s video, which is even more complicated.
My stuff.Shameless promotion: FreePop: The GPL god-sim.
I just want to know how codecs work (ignoring the file format stuff) and how it turns data into sound, how do you tell the sound card to play a pitch?, If ment to be played, does it turn the file into a waveform in a sound buffer? What format are sound buffers in?
Pretty much. For audio, the usual way is to decode it into a PCM wave (google a definition) and stream that into the sound card. It entirely depends on the sound card as to what formats it will support.

The steps are like this:
Read the file (wholly or partially) into a buffer,
Decode what''s in the buffer from your codec format into something the sound card understands (usually PCM),
Give that to the sound card somehow (stream, special buffer).
My stuff.Shameless promotion: FreePop: The GPL god-sim.

This topic is closed to new replies.

Advertisement