added an endianness check in VorbisDecoder.cpp

This commit is contained in:
bill@Ixion
2009-08-31 16:29:27 -05:00
parent d3d7d787e4
commit b8677cebd0
3 changed files with 145 additions and 128 deletions
+13 -12
View File
@@ -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;