Pārlūkot izejas kodu

added documentation for mapped file structure

thajohns 3 gadi atpakaļ
vecāks
revīzija
ff702c8fd5
1 mainītis faili ar 10 papildinājumiem un 0 dzēšanām
  1. 10 0
      render.py

+ 10 - 0
render.py

@@ -1,5 +1,15 @@
 # A visualizer for the Python client (or any other client) rendering to a mapped file
 
+# The map file format should look like the following C structure:
+# struct mapping {
+#   float disp_factor;  // scales the response to a note
+#   float last_samples[MAP_SAMPLES];  // samples from the waveform being played
+#   struct {
+#     unsigned long frequency;
+#     float amplitude;
+#   } values[STREAMS];
+# }
+
 import optparse
 import mmap
 import os