mirror of
https://github.com/thepigeongenerator/tetris_clone.git
synced 2025-12-17 14:05:45 +01:00
add game times
This commit is contained in:
@@ -86,7 +86,7 @@ audio_data audio_wav_load(audio_device const* const dev, char const* const fpath
|
||||
convert_audio(dev, wav_spec, &audio.buf, &audio.len);
|
||||
|
||||
// calculate the amount of seconds that the audio fragment has
|
||||
audio.sec = (audio.len / (SDL_AUDIO_BITSIZE(dev->fmt) / 8)) / wav_spec.channels / dev->freq;
|
||||
audio.ms = 1000 * (((audio.len) / (SDL_AUDIO_BITSIZE(dev->fmt) / 8)) / wav_spec.channels / dev->freq);
|
||||
|
||||
return audio;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user