A buffer size of 1/20th of a second seems to be stable even with the game compiling or running in a separate process
Some notes
I decided to make some static wave generators. Those aren't done yet, but here's a fun diversion in compile-time math. There does not appear to exist a well-maintained C++11 compile time math library, so perhaps I'll add some more functions to that end.
Add makefile entry for this small test, for convenience
Simpler recurrence for cosine
Added sine wave.
moved this to math.h
Added atan for computing pi. However, it is pretty inaccurate even at 10000 iterations (which nonetheless computes pretty fast!) It's probably better to just use a literal
added absurd precision for pi
simplified sine somewhat
My sine wave works fine for audio
Numerical approximation for ln, and real number powers. Not too bad
real-number power example
Cleanup headers and add some structure/comments
Use namespaces to expose a cleaner API for the math functions
Wave generating an interesting, not sine wave sound. More importantly, this isn't hooked up such that the constexprs are actually precompiled
Add test file for notes
Stack overflow constarray implementation
@JonathanWakely's boost licensed implementation of a compile time integer sequence
add note implementation. Goal here is to make compile-time finite arrays for various notes, that can then be played back