mirror of
https://github.com/love2d/love.git
synced 2026-08-21 21:15:09 +02:00
FLAC: Update dr_flac to 0.12.3
Improved seeking for FLAC audio files.
This commit is contained in:
+4229
-2099
File diff suppressed because it is too large
Load Diff
@@ -34,7 +34,7 @@ namespace lullaby
|
|||||||
FLACDecoder::FLACDecoder(Data *data, int nbufferSize)
|
FLACDecoder::FLACDecoder(Data *data, int nbufferSize)
|
||||||
: Decoder(data, nbufferSize)
|
: Decoder(data, nbufferSize)
|
||||||
{
|
{
|
||||||
flac = drflac_open_memory(data->getData(), data->getSize());
|
flac = drflac_open_memory(data->getData(), data->getSize(), nullptr);
|
||||||
if (flac == nullptr)
|
if (flac == nullptr)
|
||||||
throw love::Exception("Could not load FLAC file");
|
throw love::Exception("Could not load FLAC file");
|
||||||
}
|
}
|
||||||
@@ -52,7 +52,7 @@ bool FLACDecoder::accepts(const std::string &ext)
|
|||||||
// Please remove once it's no longer the case.
|
// Please remove once it's no longer the case.
|
||||||
static const std::string supported[] =
|
static const std::string supported[] =
|
||||||
{
|
{
|
||||||
"flac", "ogg"
|
"flac", "ogg", ""
|
||||||
};
|
};
|
||||||
|
|
||||||
for (int i = 0; !(supported[i].empty()); i++)
|
for (int i = 0; !(supported[i].empty()); i++)
|
||||||
@@ -125,4 +125,3 @@ double FLACDecoder::getDuration()
|
|||||||
} // lullaby
|
} // lullaby
|
||||||
} // sound
|
} // sound
|
||||||
} // love
|
} // love
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user