luaradio icon indicating copy to clipboard operation
luaradio copied to clipboard

WAVFileSource combined with rate changes causes crashes

Open zipcode opened this issue 4 years ago • 0 comments

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.

zipcode avatar Oct 27 '21 21:10 zipcode