Skip to content

Lab 6: AC97-lite PCM Audio

Generated folder: labs/audio/

Lab 6 introduces audio as a stream of samples. Instead of drawing pixels into a framebuffer, you fill an audio buffer with PCM data and ask the runtime to play it.

Device Model

ConceptMeaning
PCM samplenumeric amplitude at one point in time
sample ratesamples per second
channel countmono or stereo layout
buffermapped memory for samples
byte countamount the device should consume

Plan

  1. Map the audio buffer.
  2. Validate frequency and duration.
  3. Convert milliseconds into sample count.
  4. Generate a square wave.
  5. Start and stop playback.

Next: implementation tasks.

Course/docs licensed CC BY 4.0. Code licensed MIT.