mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
added an endianness check in VorbisDecoder.cpp
This commit is contained in:
@@ -35,22 +35,23 @@ namespace sound
|
||||
{
|
||||
namespace lullaby
|
||||
{
|
||||
// Struct for handling data
|
||||
struct SOggFile
|
||||
{
|
||||
char * dataPtr; // Pointer to the data in memory
|
||||
int dataSize; // Size of the data
|
||||
int dataRead; // How much we've read so far
|
||||
// Struct for handling data
|
||||
struct SOggFile
|
||||
{
|
||||
char * dataPtr; // Pointer to the data in memory
|
||||
int dataSize; // Size of the data
|
||||
int dataRead; // How much we've read so far
|
||||
};
|
||||
|
||||
class VorbisDecoder : public Decoder
|
||||
{
|
||||
private:
|
||||
SOggFile oggFile; // (see struct)
|
||||
ov_callbacks vorbisCallbacks; // Callbacks used to read the file from mem
|
||||
OggVorbis_File handle; // Handle to the file
|
||||
vorbis_info * vorbisInfo; // Info
|
||||
private:
|
||||
SOggFile oggFile; // (see struct)
|
||||
ov_callbacks vorbisCallbacks; // Callbacks used to read the file from mem
|
||||
OggVorbis_File handle; // Handle to the file
|
||||
vorbis_info * vorbisInfo; // Info
|
||||
vorbis_comment * vorbisComment; // Comments
|
||||
int endian; // Endianness
|
||||
|
||||
public:
|
||||
|
||||
@@ -64,7 +65,7 @@ namespace lullaby
|
||||
bool seek(float s);
|
||||
bool rewind();
|
||||
bool isSeekable();
|
||||
int getChannels() const;
|
||||
int getChannels() const;
|
||||
int getBits() const;
|
||||
int getSampleRate() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user