Commits

Bart van Strien  committed 277df6e

Rename SoundData:getBits to getBitDepth (resolve #636)

  • Participants
  • Parent commits 351c977

Comments (0)

Files changed (5)

File src/modules/audio/openal/Source.cpp

 	, toLoop(0)
 {
 	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());
 
 	static float z[3] = {0, 0, 0};

File src/modules/sound/SoundData.cpp

 	return channels;
 }
 
-int SoundData::getBits() const
+int SoundData::getBitDepth() const
 {
 	return bits;
 }

File src/modules/sound/SoundData.h

 	int getSize() const;
 
 	virtual int getChannels() const;
-	virtual int getBits() const;
+	virtual int getBitDepth() const;
 	virtual int getSampleRate() const;
 	virtual int getSampleCount() const;
 

File src/modules/sound/wrap_SoundData.cpp

 	return 1;
 }
 
-int w_SoundData_getBits(lua_State *L)
+int w_SoundData_getBitDepth(lua_State *L)
 {
 	SoundData *t = luax_checksounddata(L, 1);
-	lua_pushinteger(L, t->getBits());
+	lua_pushinteger(L, t->getBitDepth());
 	return 1;
 }
 
 	{ "getSize", w_Data_getSize },
 
 	{ "getChannels", w_SoundData_getChannels },
-	{ "getBits", w_SoundData_getBits },
+	{ "getBitDepth", w_SoundData_getBitDepth },
 	{ "getSampleRate", w_SoundData_getSampleRate },
 	{ "getSampleCount", w_SoundData_getSampleCount },
 	{ "getDuration", w_SoundData_getDuration },

File src/modules/sound/wrap_SoundData.h

 SoundData *luax_checksounddata(lua_State *L, int idx);
 int w_getSize(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_getSampleCount(lua_State *L);
 int w_getDuration(lua_State *L);