Fix conflicts with default

--HG--
branch : sounddata-samplecount
This commit is contained in:
darthfodder
2013-04-07 18:22:56 -07:00
39 changed files with 50112 additions and 45013 deletions
+2 -2
View File
@@ -152,9 +152,9 @@ int SoundData::getSampleCount() const
return (size/channels)/(bits/8);
}
int SoundData::getDuration() const
float SoundData::getDuration() const
{
return size/(channels*sampleRate*bits/8);
return float(size) /(channels*sampleRate*bits/8);
}
void SoundData::setSample(int i, float sample)
+1 -1
View File
@@ -50,7 +50,7 @@ public:
virtual int getSampleRate() const;
virtual int getSampleCount() const;
virtual int getDuration() const;
virtual float getDuration() const;
void setSample(int i, float sample);
float getSample(int i) const;
+1 -1
View File
@@ -63,7 +63,7 @@ int w_SoundData_getSampleCount(lua_State *L)
int w_SoundData_getDuration(lua_State *L)
{
SoundData *t = luax_checksounddata(L, 1);
lua_pushinteger(L, t->getDuration());
lua_pushnumber(L, t->getDuration());
return 1;
}