mirror of
https://github.com/love2d/love.git
synced 2026-08-19 04:06:17 +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:
@@ -62,6 +62,7 @@ public:
|
||||
int getChannels() const;
|
||||
int getBitDepth() const;
|
||||
int getSampleRate() const;
|
||||
double getDuration();
|
||||
|
||||
private:
|
||||
SOggFile oggFile; // (see struct)
|
||||
@@ -70,6 +71,7 @@ private:
|
||||
vorbis_info *vorbisInfo; // Info
|
||||
vorbis_comment *vorbisComment; // Comments
|
||||
int endian; // Endianness
|
||||
double duration;
|
||||
}; // VorbisDecoder
|
||||
|
||||
} // lullaby
|
||||
|
||||
Reference in New Issue
Block a user