luaradio
luaradio copied to clipboard
WAVFileSource combined with rate changes causes crashes
I found that sourcing data from a WAVFileSource and then using DecimatorBlock or DownsamplerBlock caused my flowchart to fail to initialize. As far as I can tell, get_rate is called on the decimator before the rate is actually available from the source, causing it to return nil and fail.
As a workaround, I did the following:
local src = radio.WAVFileSource("RTTY.wav", 1)
src:initialize()
Running initialize manually seems to be harmless, and does make sure that the rate is available by the time we try to run the flowchart.