mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Code review
This commit is contained in:
@@ -200,11 +200,7 @@ double CSoundHandler::getSoundDuration(const AudioPath & sound)
|
||||
SDL_FreeWAV(audioBuf);
|
||||
uint32_t sampleSize = SDL_AUDIO_BITSIZE(spec.format) / 8;
|
||||
uint32_t sampleCount = audioLen / sampleSize;
|
||||
uint32_t sampleLen = 0;
|
||||
if(spec.channels)
|
||||
sampleLen = sampleCount / spec.channels;
|
||||
else
|
||||
sampleLen = sampleCount;
|
||||
uint32_t sampleLen = sampleCount / spec.channels;
|
||||
seconds = (double)sampleLen / (double)spec.freq;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user