Merge remote-tracking branches 'neheb/patch-2', 'neheb/con', 'neheb/cons', 'neheb/guruhg', 'neheb/r12R3', 'neheb/fefgheh' and 'neheb/rhgerg3453'
This commit is contained in:
@@ -41,7 +41,7 @@ adplug_init(const ConfigBlock &block)
|
||||
FormatDebug(adplug_domain, "adplug %s",
|
||||
CAdPlug::get_version().c_str());
|
||||
|
||||
sample_rate = block.GetPositiveValue("sample_rate", 48000u);
|
||||
sample_rate = block.GetPositiveValue("sample_rate", 48000U);
|
||||
CheckSampleRate(sample_rate);
|
||||
|
||||
return true;
|
||||
|
@@ -200,7 +200,7 @@ audiofile_stream_decode(DecoderClient &client, InputStream &is)
|
||||
AudioFileInputStream afis{&client, is};
|
||||
AFvirtualfile *const vf = setup_virtual_fops(afis);
|
||||
|
||||
const AFfilehandle fh = afOpenVirtualFile(vf, "r", nullptr);
|
||||
auto fh = afOpenVirtualFile(vf, "r", nullptr);
|
||||
if (fh == AF_NULL_FILEHANDLE)
|
||||
return;
|
||||
|
||||
@@ -269,6 +269,8 @@ static const char *const audiofile_suffixes[] = {
|
||||
};
|
||||
|
||||
static const char *const audiofile_mime_types[] = {
|
||||
"audio/wav",
|
||||
"audio/aiff",
|
||||
"audio/x-wav",
|
||||
"audio/x-aiff",
|
||||
nullptr
|
||||
|
@@ -150,6 +150,5 @@ dsdlib_tag_id3(InputStream &is, TagHandler &handler,
|
||||
scan_id3_tag(id3_tag, handler);
|
||||
|
||||
id3_tag_delete(id3_tag);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
@@ -213,7 +213,6 @@ dsdiff_handle_native_tag(DecoderClient *client, InputStream &is,
|
||||
return;
|
||||
|
||||
handler.OnTag(type, {label, length});
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -231,7 +231,7 @@ faad_song_duration(DecoderBuffer &buffer, InputStream &is)
|
||||
static NeAACDecHandle
|
||||
faad_decoder_new()
|
||||
{
|
||||
const NeAACDecHandle decoder = NeAACDecOpen();
|
||||
auto decoder = NeAACDecOpen();
|
||||
|
||||
NeAACDecConfigurationPtr config =
|
||||
NeAACDecGetCurrentConfiguration(decoder);
|
||||
@@ -324,7 +324,7 @@ faad_get_file_time(InputStream &is)
|
||||
|
||||
static void
|
||||
faad_stream_decode(DecoderClient &client, InputStream &is,
|
||||
DecoderBuffer &buffer, const NeAACDecHandle decoder)
|
||||
DecoderBuffer &buffer, NeAACDecHandle decoder)
|
||||
{
|
||||
const auto total_time = faad_song_duration(buffer, is);
|
||||
|
||||
@@ -406,7 +406,7 @@ faad_stream_decode(DecoderClient &client, InputStream &is)
|
||||
|
||||
/* create the libfaad decoder */
|
||||
|
||||
const NeAACDecHandle decoder = faad_decoder_new();
|
||||
auto decoder = faad_decoder_new();
|
||||
AtScopeExit(decoder) { NeAACDecClose(decoder); };
|
||||
|
||||
faad_stream_decode(client, is, buffer, decoder);
|
||||
|
@@ -698,7 +698,7 @@ static const char *const ffmpeg_mime_types[] = {
|
||||
"audio/aac",
|
||||
"audio/aacp",
|
||||
"audio/ac3",
|
||||
"audio/aiff"
|
||||
"audio/aiff",
|
||||
"audio/amr",
|
||||
"audio/basic",
|
||||
"audio/flac",
|
||||
@@ -711,12 +711,13 @@ static const char *const ffmpeg_mime_types[] = {
|
||||
"audio/qcelp",
|
||||
"audio/vorbis",
|
||||
"audio/vorbis+ogg",
|
||||
"audio/wav",
|
||||
"audio/x-8svx",
|
||||
"audio/x-16sv",
|
||||
"audio/x-aac",
|
||||
"audio/x-ac3",
|
||||
"audio/x-adx",
|
||||
"audio/x-aiff"
|
||||
"audio/x-aiff",
|
||||
"audio/x-alaw",
|
||||
"audio/x-au",
|
||||
"audio/x-dca",
|
||||
@@ -736,7 +737,7 @@ static const char *const ffmpeg_mime_types[] = {
|
||||
"audio/x-pn-realaudio",
|
||||
"audio/x-pn-multirate-realaudio",
|
||||
"audio/x-speex",
|
||||
"audio/x-tta"
|
||||
"audio/x-tta",
|
||||
"audio/x-voc",
|
||||
"audio/x-wav",
|
||||
"audio/x-wma",
|
||||
|
@@ -77,7 +77,7 @@ fluidsynth_mpd_log_function(int level,
|
||||
static bool
|
||||
fluidsynth_init(const ConfigBlock &block)
|
||||
{
|
||||
sample_rate = block.GetPositiveValue("sample_rate", 48000u);
|
||||
sample_rate = block.GetPositiveValue("sample_rate", 48000U);
|
||||
CheckSampleRate(sample_rate);
|
||||
|
||||
soundfont_path = block.GetBlockValue("soundfont",
|
||||
|
@@ -186,7 +186,7 @@ HybridDsdDecode(DecoderClient &client, InputStream &input)
|
||||
client.Ready(result.first, true, duration);
|
||||
frame_size = result.first.GetFrameSize();
|
||||
kbit_rate = frame_size * result.first.sample_rate /
|
||||
(1024u / 8u);
|
||||
(1024U / 8U);
|
||||
total_frames = result.second / frame_size;
|
||||
} catch (UnsupportedFile) {
|
||||
/* not a Hybrid-DSD file; let the next decoder plugin
|
||||
@@ -236,7 +236,7 @@ HybridDsdDecode(DecoderClient &client, InputStream &input)
|
||||
/* fill the buffer */
|
||||
auto w = buffer.Write();
|
||||
if (!w.empty()) {
|
||||
if (remaining_bytes < (1<<30ull) &&
|
||||
if (remaining_bytes < (1<<30ULL) &&
|
||||
w.size > size_t(remaining_bytes))
|
||||
w.size = remaining_bytes;
|
||||
|
||||
|
@@ -760,7 +760,7 @@ MadDecoder::DecodeFirstFrame(Tag *tag) noexcept
|
||||
|
||||
if (max_frames > 8 * 1024 * 1024) {
|
||||
FormatWarning(mad_domain,
|
||||
"mp3 file header indicates too many frames: %lu",
|
||||
"mp3 file header indicates too many frames: %zu",
|
||||
max_frames);
|
||||
return false;
|
||||
}
|
||||
|
@@ -108,7 +108,7 @@ mikmod_decoder_init(const ConfigBlock &block)
|
||||
static char params[] = "";
|
||||
|
||||
mikmod_loop = block.GetBlockValue("loop", false);
|
||||
mikmod_sample_rate = block.GetPositiveValue("sample_rate", 44100u);
|
||||
mikmod_sample_rate = block.GetPositiveValue("sample_rate", 44100U);
|
||||
if (!audio_valid_sample_rate(mikmod_sample_rate))
|
||||
throw FormatRuntimeError("Invalid sample rate in line %d: %u",
|
||||
block.line, mikmod_sample_rate);
|
||||
|
@@ -45,8 +45,12 @@ OggDecoder::LoadEndPacket(ogg_packet &packet) const
|
||||
DecoderReader reader(client, input_stream);
|
||||
OggSyncState sync2(reader);
|
||||
OggStreamState stream2(GetSerialNo());
|
||||
|
||||
/* passing synced=false because we're inside an
|
||||
OggVisitor callback, and our InputStream may be in
|
||||
the middle of an Ogg packet */
|
||||
result = OggSeekFindEOS(sync2, stream2, packet,
|
||||
input_stream);
|
||||
input_stream, false);
|
||||
}
|
||||
|
||||
/* restore the previous file position */
|
||||
|
@@ -127,7 +127,7 @@ SidplayGlobal::SidplayGlobal(const ConfigBlock &block)
|
||||
if (!database_path.IsNull())
|
||||
songlength_database = sidplay_load_songlength_db(database_path);
|
||||
|
||||
default_songlength = block.GetPositiveValue("default_songlength", 0u);
|
||||
default_songlength = block.GetPositiveValue("default_songlength", 0U);
|
||||
|
||||
default_genre = block.GetBlockValue("default_genre", "");
|
||||
|
||||
@@ -403,7 +403,7 @@ sidplay_file_decode(DecoderClient &client, Path path_fs)
|
||||
const unsigned timebase = player.timebase();
|
||||
#endif
|
||||
const unsigned end = duration.IsNegative()
|
||||
? 0u
|
||||
? 0U
|
||||
: duration.ToScale<uint64_t>(timebase);
|
||||
|
||||
DecoderCommand cmd;
|
||||
|
@@ -323,6 +323,8 @@ static const char *const sndfile_suffixes[] = {
|
||||
};
|
||||
|
||||
static const char *const sndfile_mime_types[] = {
|
||||
"audio/wav",
|
||||
"audio/aiff",
|
||||
"audio/x-wav",
|
||||
"audio/x-aiff",
|
||||
|
||||
|
Reference in New Issue
Block a user