Quote:
Originally Posted by twobob
Excellent! I think that covers it nicely sir.
In other news I think I finally managed to x-compile alsa... 
|
While you were typing that, I moved that "Theory" block (intact) to the top post, where it really belongs. It is now "mirrored" in your 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