mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
Renamed Decoder:getBits to Decoder:getBitDepth (see issue #636)
This commit is contained in:
@@ -41,7 +41,7 @@ FLACDecoder::FLACDecoder(Data *data, const std::string &ext, int nbufferSize)
|
||||
process_until_end_of_metadata();
|
||||
process_single();
|
||||
seek(0);
|
||||
bufferSize = 256 * getBits() * getChannels() * 2;
|
||||
bufferSize = 256 * getBitDepth() * getChannels() * 2;
|
||||
delete[](char *) buffer;
|
||||
buffer = new char[bufferSize];
|
||||
}
|
||||
@@ -98,7 +98,7 @@ int FLACDecoder::getChannels() const
|
||||
return get_channels();
|
||||
}
|
||||
|
||||
int FLACDecoder::getBits() const
|
||||
int FLACDecoder::getBitDepth() const
|
||||
{
|
||||
return get_bits_per_sample();
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
bool rewind();
|
||||
bool isSeekable();
|
||||
int getChannels() const;
|
||||
int getBits() const;
|
||||
int getBitDepth() const;
|
||||
int getSampleRate() const;
|
||||
|
||||
//needed for FLAC
|
||||
|
||||
@@ -137,7 +137,7 @@ int GmeDecoder::getChannels() const
|
||||
return 2;
|
||||
}
|
||||
|
||||
int GmeDecoder::getBits() const
|
||||
int GmeDecoder::getBitDepth() const
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
bool rewind();
|
||||
bool isSeekable();
|
||||
int getChannels() const;
|
||||
int getBits() const;
|
||||
int getBitDepth() const;
|
||||
|
||||
private:
|
||||
Music_Emu *emu;
|
||||
|
||||
@@ -137,7 +137,7 @@ int ModPlugDecoder::getChannels() const
|
||||
return 2;
|
||||
}
|
||||
|
||||
int ModPlugDecoder::getBits() const
|
||||
int ModPlugDecoder::getBitDepth() const
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
bool rewind();
|
||||
bool isSeekable();
|
||||
int getChannels() const;
|
||||
int getBits() const;
|
||||
int getBitDepth() const;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ int Mpg123Decoder::getChannels() const
|
||||
return channels;
|
||||
}
|
||||
|
||||
int Mpg123Decoder::getBits() const
|
||||
int Mpg123Decoder::getBitDepth() const
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
bool rewind();
|
||||
bool isSeekable();
|
||||
int getChannels() const;
|
||||
int getBits() const;
|
||||
int getBitDepth() const;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ int VorbisDecoder::decode()
|
||||
|
||||
while (size < bufferSize)
|
||||
{
|
||||
int result = ov_read(&handle, (char *) buffer + size, bufferSize - size, endian, (getBits() == 16 ? 2 : 1), 1, 0);
|
||||
int result = ov_read(&handle, (char *) buffer + size, bufferSize - size, endian, (getBitDepth() == 16 ? 2 : 1), 1, 0);
|
||||
|
||||
if (result == OV_HOLE)
|
||||
continue;
|
||||
@@ -243,7 +243,7 @@ int VorbisDecoder::getChannels() const
|
||||
return vorbisInfo->channels;
|
||||
}
|
||||
|
||||
int VorbisDecoder::getBits() const
|
||||
int VorbisDecoder::getBitDepth() const
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
bool rewind();
|
||||
bool isSeekable();
|
||||
int getChannels() const;
|
||||
int getBits() const;
|
||||
int getBitDepth() const;
|
||||
int getSampleRate() const;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user