Fixed SoundData:getDuration

This commit is contained in:
Alex Szpakowski
2013-03-26 19:45:32 -03:00
parent 275a144907
commit fa799227a2
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -147,9 +147,9 @@ int SoundData::getSampleRate() const
return sampleRate;
}
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)