Did it occur to you that for a pure sine in audio you just need half the wave and mirror that for the lower part? Or at most one complete sine cycle.
If it is sine, you can simply switch buffers two , not regenerate them.
That would greatly simplify the code and is less demanding on the CPU.
You should also generate the pre-compiled sine waves depending on the sample rate. Adjusting for note value can simply be done with the twelft root of two (~1.05 * note value)
This is how most synthesizers work.