mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Rename Source/SoundData/Decoder:getChannels to getChannelCount (resolves issue #1307). Deprecate the old methods rather than completely removing them.
--HG-- branch : minor
This commit is contained in:
@@ -258,7 +258,7 @@ bool CoreAudioDecoder::isSeekable()
|
||||
return true;
|
||||
}
|
||||
|
||||
int CoreAudioDecoder::getChannels() const
|
||||
int CoreAudioDecoder::getChannelCount() const
|
||||
{
|
||||
return outputInfo.mChannelsPerFrame;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
bool seek(float s);
|
||||
bool rewind();
|
||||
bool isSeekable();
|
||||
int getChannels() const;
|
||||
int getChannelCount() const;
|
||||
int getBitDepth() const;
|
||||
double getDuration();
|
||||
|
||||
|
||||
@@ -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 * getBitDepth() * getChannels() * 2;
|
||||
bufferSize = 256 * getBitDepth() * getChannelCount() * 2;
|
||||
delete[](char *) buffer;
|
||||
buffer = new char[bufferSize];
|
||||
}
|
||||
@@ -93,7 +93,7 @@ bool FLACDecoder::isSeekable()
|
||||
return true;
|
||||
}
|
||||
|
||||
int FLACDecoder::getChannels() const
|
||||
int FLACDecoder::getChannelCount() const
|
||||
{
|
||||
return get_channels();
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
bool seek(float s);
|
||||
bool rewind();
|
||||
bool isSeekable();
|
||||
int getChannels() const;
|
||||
int getChannelCount() const;
|
||||
int getBitDepth() const;
|
||||
int getSampleRate() const;
|
||||
double getDuration();
|
||||
|
||||
@@ -132,7 +132,7 @@ bool GmeDecoder::isSeekable()
|
||||
return true;
|
||||
}
|
||||
|
||||
int GmeDecoder::getChannels() const
|
||||
int GmeDecoder::getChannelCount() const
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
bool seek(float s);
|
||||
bool rewind();
|
||||
bool isSeekable();
|
||||
int getChannels() const;
|
||||
int getChannelCount() const;
|
||||
int getBitDepth() const;
|
||||
double getDuration();
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ bool ModPlugDecoder::isSeekable()
|
||||
return true;
|
||||
}
|
||||
|
||||
int ModPlugDecoder::getChannels() const
|
||||
int ModPlugDecoder::getChannelCount() const
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
bool seek(float s);
|
||||
bool rewind();
|
||||
bool isSeekable();
|
||||
int getChannels() const;
|
||||
int getChannelCount() const;
|
||||
int getBitDepth() const;
|
||||
double getDuration();
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@ bool Mpg123Decoder::isSeekable()
|
||||
return true;
|
||||
}
|
||||
|
||||
int Mpg123Decoder::getChannels() const
|
||||
int Mpg123Decoder::getChannelCount() const
|
||||
{
|
||||
return channels;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
bool seek(float s);
|
||||
bool rewind();
|
||||
bool isSeekable();
|
||||
int getChannels() const;
|
||||
int getChannelCount() const;
|
||||
int getBitDepth() const;
|
||||
double getDuration();
|
||||
|
||||
|
||||
@@ -250,7 +250,7 @@ bool VorbisDecoder::isSeekable()
|
||||
return (result != 0);
|
||||
}
|
||||
|
||||
int VorbisDecoder::getChannels() const
|
||||
int VorbisDecoder::getChannelCount() const
|
||||
{
|
||||
return vorbisInfo->channels;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
bool seek(float s);
|
||||
bool rewind();
|
||||
bool isSeekable();
|
||||
int getChannels() const;
|
||||
int getChannelCount() const;
|
||||
int getBitDepth() const;
|
||||
int getSampleRate() const;
|
||||
double getDuration();
|
||||
|
||||
@@ -174,7 +174,7 @@ bool WaveDecoder::isSeekable()
|
||||
return true;
|
||||
}
|
||||
|
||||
int WaveDecoder::getChannels() const
|
||||
int WaveDecoder::getChannelCount() const
|
||||
{
|
||||
return info.channels;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
bool seek(float s);
|
||||
bool rewind();
|
||||
bool isSeekable();
|
||||
int getChannels() const;
|
||||
int getChannelCount() const;
|
||||
int getBitDepth() const;
|
||||
int getSampleRate() const;
|
||||
double getDuration();
|
||||
|
||||
Reference in New Issue
Block a user