Defines RDWaveFile ext_time_length/time_length for flac format

This commit is contained in:
Alban Peignier 2014-10-04 11:13:03 +02:00
parent d244ef75af
commit 5c2ccaf324

View File

@ -3759,6 +3759,8 @@ bool RDWaveFile::GetFlacStreamInfo()
bits_per_sample=sinfo.data.stream_info.bits_per_sample; bits_per_sample=sinfo.data.stream_info.bits_per_sample;
sample_length=sinfo.data.stream_info.total_samples; sample_length=sinfo.data.stream_info.total_samples;
channels=sinfo.data.stream_info.channels; channels=sinfo.data.stream_info.channels;
ext_time_length=(unsigned)(1000.0*(double)sample_length/(double)samples_per_sec);
time_length=ext_time_length/1000;
return true; return true;
#else #else
return false; return false;