add last backwards-compatible version

This commit is contained in:
2021-12-14 00:33:46 -07:00
parent 68b10d413b
commit b0dd3f07f3
335 changed files with 4746 additions and 19627 deletions

View File

@@ -5,9 +5,6 @@
#define _atoi64 atoll
#endif
const float replaygain_info::peak_invalid = -1;
const float replaygain_info::gain_invalid = -1000;
t_size file_info::meta_find_ex(const char * p_name,t_size p_name_length) const
{
t_size n, m = meta_get_count();
@@ -414,19 +411,6 @@ void file_info::info_calculate_bitrate(t_filesize p_filesize,double p_length)
if ( b > 0 ) info_set_bitrate(b);
}
bool file_info::is_encoding_overkill() const {
auto bs = info_get_int("bitspersample");
auto extra = info_get("bitspersample_extra");
if ( bs <= 24 ) return false; // fixedpoint up to 24bit, OK
if ( bs > 32 ) return true; // fixed or float beyond 32bit, overkill
if ( extra != nullptr ) {
if (strcmp(extra, "fixed-point") == 0) return true; // int32, overkill
}
return false;
}
bool file_info::is_encoding_lossy() const {
const char * encoding = info_get("encoding");
if (encoding != NULL) {
@@ -766,4 +750,4 @@ audio_chunk::spec_t file_info::audio_chunk_spec() const
rv.chanMask = audio_chunk::g_guess_channel_config( rv.chanCount );
}
return rv;
}
}