Added Source:getDuration (thanks Boolsheet!)

For streaming sources, the duration may not always be sample-accurate and may return -1 if it cannot be determined at all.
This commit is contained in:
Alex Szpakowski
2015-11-07 01:49:37 -04:00
parent 1b5a0f49fa
commit 0558fcdbd4
28 changed files with 321 additions and 90 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ sound::Decoder *Sound::newDecoder(love::filesystem::FileData *data, int bufferSi
std::string ext = data->getExtension();
std::transform(ext.begin(), ext.end(), ext.begin(), tolower);
sound::Decoder *decoder = 0;
sound::Decoder *decoder = nullptr;
// Find a suitable decoder here, and return it.
if (false)