mirror of
https://github.com/love2d/love.git
synced 2026-08-20 04:30:09 +02:00
Rename SoundData:getBits to getBitDepth (resolve #636)
This commit is contained in:
@@ -52,7 +52,7 @@ Source::Source(Pool *pool, love::sound::SoundData *soundData)
|
|||||||
, toLoop(0)
|
, toLoop(0)
|
||||||
{
|
{
|
||||||
alGenBuffers(1, buffers);
|
alGenBuffers(1, buffers);
|
||||||
ALenum fmt = getFormat(soundData->getChannels(), soundData->getBits());
|
ALenum fmt = getFormat(soundData->getChannels(), soundData->getBitDepth());
|
||||||
alBufferData(buffers[0], fmt, soundData->getData(), soundData->getSize(), soundData->getSampleRate());
|
alBufferData(buffers[0], fmt, soundData->getData(), soundData->getSize(), soundData->getSampleRate());
|
||||||
|
|
||||||
static float z[3] = {0, 0, 0};
|
static float z[3] = {0, 0, 0};
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ int SoundData::getChannels() const
|
|||||||
return channels;
|
return channels;
|
||||||
}
|
}
|
||||||
|
|
||||||
int SoundData::getBits() const
|
int SoundData::getBitDepth() const
|
||||||
{
|
{
|
||||||
return bits;
|
return bits;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public:
|
|||||||
int getSize() const;
|
int getSize() const;
|
||||||
|
|
||||||
virtual int getChannels() const;
|
virtual int getChannels() const;
|
||||||
virtual int getBits() const;
|
virtual int getBitDepth() const;
|
||||||
virtual int getSampleRate() const;
|
virtual int getSampleRate() const;
|
||||||
virtual int getSampleCount() const;
|
virtual int getSampleCount() const;
|
||||||
|
|
||||||
|
|||||||
@@ -39,10 +39,10 @@ int w_SoundData_getChannels(lua_State *L)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int w_SoundData_getBits(lua_State *L)
|
int w_SoundData_getBitDepth(lua_State *L)
|
||||||
{
|
{
|
||||||
SoundData *t = luax_checksounddata(L, 1);
|
SoundData *t = luax_checksounddata(L, 1);
|
||||||
lua_pushinteger(L, t->getBits());
|
lua_pushinteger(L, t->getBitDepth());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ static const luaL_Reg functions[] =
|
|||||||
{ "getSize", w_Data_getSize },
|
{ "getSize", w_Data_getSize },
|
||||||
|
|
||||||
{ "getChannels", w_SoundData_getChannels },
|
{ "getChannels", w_SoundData_getChannels },
|
||||||
{ "getBits", w_SoundData_getBits },
|
{ "getBitDepth", w_SoundData_getBitDepth },
|
||||||
{ "getSampleRate", w_SoundData_getSampleRate },
|
{ "getSampleRate", w_SoundData_getSampleRate },
|
||||||
{ "getSampleCount", w_SoundData_getSampleCount },
|
{ "getSampleCount", w_SoundData_getSampleCount },
|
||||||
{ "getDuration", w_SoundData_getDuration },
|
{ "getDuration", w_SoundData_getDuration },
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace sound
|
|||||||
SoundData *luax_checksounddata(lua_State *L, int idx);
|
SoundData *luax_checksounddata(lua_State *L, int idx);
|
||||||
int w_getSize(lua_State *L);
|
int w_getSize(lua_State *L);
|
||||||
int w_getChannels(lua_State *L);
|
int w_getChannels(lua_State *L);
|
||||||
int w_getBits(lua_State *L);
|
int w_getBitDepth(lua_State *L);
|
||||||
int w_getSampleRate(lua_State *L);
|
int w_getSampleRate(lua_State *L);
|
||||||
int w_getSampleCount(lua_State *L);
|
int w_getSampleCount(lua_State *L);
|
||||||
int w_getDuration(lua_State *L);
|
int w_getDuration(lua_State *L);
|
||||||
|
|||||||
Reference in New Issue
Block a user