ChrisOS Research ProjectOperating systems · language systems · graphics · machine emulation
DOCUMENTATION ARCHIVEMAIN BRANCH
ChrisOS/Source reference: APPS/WAV/PLAY.CC

Source reference: APPS/WAV/PLAY.CC

Deterministic source record. The complete textual file is reproduced below; this page does not replace architectural interpretation in the authored chapters.

File identity

Field Value
Path APPS/WAV/PLAY.CC
Lines 20
Bytes 327
SHA-256 3a2eb62129927a7efdca36374ad5368855edc3a60c2b979a666a22d44caa4345
ChrisOS revision da3df29cb397932c43d32373871fb9380e688ade

Detected syntactic dependencies

Line Include
— No preprocessor include detected.

Detected symbols

Line Symbol
1 main

Complete source

The following block is the complete textual file at the recorded revision. No lines are elided, abbreviated or paraphrased.

void main() {
  int samples;
  int i;
  int n;
  viewport(160, 60);
  text(8, 8, "wav", 0x00FFFFFF);
  samples = malloc(256);
  i = 0;
  while (i < 128) {
    if (i % 32 < 16) {
      storeb(samples + i * 2, 64);
      storeb(samples + i * 2 + 1, 0);
    }
    i = i + 1;
  }
  n = pcm_write(samples, 128);
  while (1) {
  }
}

Role of this record

The atlas guarantees file-by-file traceability. Responsibility, invariants, ownership, concurrency, security, performance and subsystem interactions belong in authored chapters and must cite this file when applicable.

Document record ID: source-3a2eb62129927a7e Reviewed source: da3df29cb397 Class: generated-source-reference