|
|
|
Ok i have a working wind generator now, no clicks or pops and does pretty much everyhing the old one did. Just lacking independent volume as i cannot see where that is set. Will post update here soon
My recent profiling has shown the old windCallback was using 5% of all CPU time, making it one of the top functions.
Is this new implementation faster? Rolled into
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The wind basically works but openAL seems to have a transient "click" on each buffer played. This is the same as reported by Soft previously with openAL playback. No idea of the cause yet.
The code is far from clean. There are some static global variables defined. These should be moved to class variables where possible.
There are magic numbers for sample frequency, number of buffers, length of buffer etc. Reduce magic number usage where we can.
The audio itself does not sound quite right, some of it may be due to the length and the number of buffers. This seems to be a balance between having enough buffers to maintain playback but manage to keep responsiveness up on wind changes. The current buffer system is very basic and probably could be improved.
Anyway its a start