Closed slime73 closed 8 years ago
Original comment by Alex Szpakowski (Bitbucket: slime73, GitHub: slime73).
The length of a given sound file can't really be reliably determined until it's been completely loaded (i.e. not streaming).
File size could be used, but either way it would kind of be a 'hidden magic number' that could cause side effects in code that didn't expect the default argument value to change based on external factors.
Original report by Alex Szpakowski (Bitbucket: slime73, GitHub: slime73).
Currently
love.audio.newSource(filename)
defaults to creating a streaming Source. It might be a bit more convenient for quickly getting things up and running, but it has a few downsides:Static sources have none of those issues, but they also take a long time to do the full decode when they load, if the sound file is big or long. Since each Source type has unique downsides I don't think it makes much sense to have a default, even though it would be slightly less convenient for new users.