Quote:
Originally Posted by geekmaster
While you were typing that, I moved that "Theory" block (intact) to the top post, where it really belongs. It is now "mirrored" in you quote too.
I had to copy the freshly built alsa files into my toolchain directories before I could compile sound apps.
Sadly, WHERE to put the alsa header file varies in various examples. Some use the default /include folder (like I used in the "noisy" demo), and others prefix it with alsa/ inside the #include (like you did in the "tones" demo). Perhaps it would be good to copy that header to BOTH places in the toolchain folders, so both demos can compile as-is...
EDIT: Regarding coding style and documentation: As you can see, it took 1542 characters of comments to precisely describe the operational theory of the "(random()&3)*i*350" logical expression used to stuff values into the sound buffer. Describing my much larger dithering expressions would take MUCH more effort (and words). I think that injecting those comments (and more) into my condensed code may somewhat interfere with how much REAL code fits "above the fold" (i.e. no vertical scrolling). It would also spread related code segments so far apart that relational perception would be severely degraded while "absorbing" the code. Remember, all of the BEST programmers are "trance coders", and need to absorb the structure and nuances of the code IN PARALLEL. Just read some biographies of famous software programmers and you will see what I mean.
For a great little introduction to trance coding, read this: http://www.wintermute.me.uk/writing/coding-trance.html
|
Yeah I agree. But helpful to have those notes adjacent to the code.
I recall programming a tarot program a zillion moons ago for an x086 series, it was a requirement back then to have a decent structure in your head given the limited resources before you started. Times really haven't changed that much all in.
The notes were helpful. : )