Looong time since I last posted.
Been trying to get bass.dll to work from Nim - http://nim-lang.org
. I've gotten the callback mechanism to work via RecordStart() but considering I want the FFT data, I was trying to use ChannelGetData() but after a few loops, my program crashes. The faster I poll, the faster it crashes. I've adjusted the buffer size to accommodate slower polls and am not filling it up beyond a point, but still see crashes happening.
Here's the code in question:-while true:
len = BASS_ChannelGetData(ch, nil, BASS_DATA_AVAILABLE)
if len > dword(0):
len = BASS_ChannelGetData(ch, buffer, 16384)
discard f.writeBuffer(buffer, len)
elif len == dword(0):
I don't get any stack trace so suspect there's something fishy in bass.dll or how I'm invoking it.
Any tips will be appreciated!
Thanks in advance.