Closed thornpw closed 6 years ago
@bjornbytes The issue is that the SourceType argument in love.audio.newSource is now mandatory, and you can't specify that through cargo
Maybe we could have a heuristic where big files are loaded as stream and small files are loaded as static? We could also just default to stream like in previous versions of LÖVE.
The heuristic sounds cool... having stream as default for a hotfix would be simple to do
Sounds good. Would be great to have a hotfix, since I plan to use cargo as an submodule in my library, and otherwise I have to do a fork with the nasty but working hardcoding.
Alright, the latest commit should fix this. It loads the source as 'static' if it's less than 500kb in size, otherwise it uses 'stream'.
since the new love2d version, I get these error:
Error: lib/Cargo/cargo.lua:62: bad argument #2 to 'loader' (string expected, got no value)
If did hat hotfix: local asset = nil if extension ~= "wav" then asset = loader(file) else asset = loader(file,"static") end
since I only have png's and wav's
best regards
þorN