Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Audio Compression and Codecs

This topic is 5091 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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? )

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!