mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user