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:
@@ -108,6 +108,11 @@ int FLACDecoder::getSampleRate() const
|
||||
return get_sample_rate();
|
||||
}
|
||||
|
||||
double FLACDecoder::getDuration()
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
FLAC__StreamDecoderReadStatus FLACDecoder::read_callback(FLAC__byte buffer[], size_t *bytes)
|
||||
{
|
||||
int size = data->getSize();
|
||||
|
||||
Reference in New Issue
Block a user