View Single Post
Old 02-24-2016, 02:16 PM   #8
CoreyScogin
Human being with feelings
 
CoreyScogin's Avatar
 
Join Date: Dec 2013
Posts: 31
Default

I made a couple of edits and updated the original post code section.

My math skills are both limited and rusty. I forgot that a subtraction of log values is a division of linear values. This was what I needed to remove a number of linear sample value to logarithmic dB value conversions. It's slightly more efficient now.

There was an error with how the buffer worked when the window was changed. Clearing the buffer when the window changes seems to have fixed that. I would not recommend automating a change in the window since the buffer gets cleared and messes up the calculation until it fills up again. I don't think there's a simple solution to adjusting the window on the fly with accurate results nor do I think it's needed. Typical use case would not require a window change on the fly.

Again, I'd love any suggestions or corrections/improvements on the code if any of you are interested in digging through it.
CoreyScogin is offline   Reply With Quote