decoder/mad: change "mp3_" suffix to "mad_"
This commit is contained in:
parent
61a3c69a06
commit
f51e555154
@ -105,7 +105,7 @@ mad_fixed_to_24_buffer(int32_t *dest, const struct mad_synth *synth,
|
||||
}
|
||||
|
||||
static bool
|
||||
mp3_plugin_init(const ConfigBlock &block)
|
||||
mad_plugin_init(const ConfigBlock &block)
|
||||
{
|
||||
gapless_playback = block.GetBlockValue("gapless",
|
||||
DEFAULT_GAPLESS_MP3_PLAYBACK);
|
||||
@ -643,7 +643,7 @@ parse_lame(struct lame *lame, struct mad_bitptr *ptr, int *bitlen)
|
||||
}
|
||||
|
||||
static inline SongTime
|
||||
mp3_frame_duration(const struct mad_frame *frame)
|
||||
mad_frame_duration(const struct mad_frame *frame)
|
||||
{
|
||||
return ToSongTime(frame->header.duration);
|
||||
}
|
||||
@ -673,7 +673,7 @@ MadDecoder::FileSizeToSongLength()
|
||||
if (input_stream.KnownSize()) {
|
||||
offset_type rest = RestIncludingThisFrame();
|
||||
|
||||
const SongTime frame_duration = mp3_frame_duration(&frame);
|
||||
const SongTime frame_duration = mad_frame_duration(&frame);
|
||||
const SongTime duration =
|
||||
SongTime::FromScale<uint64_t>(rest,
|
||||
frame.header.bitrate / 8);
|
||||
@ -961,7 +961,7 @@ MadDecoder::Read()
|
||||
}
|
||||
|
||||
static void
|
||||
mp3_decode(DecoderClient &client, InputStream &input_stream)
|
||||
mad_decode(DecoderClient &client, InputStream &input_stream)
|
||||
{
|
||||
MadDecoder data(&client, input_stream);
|
||||
|
||||
@ -1007,18 +1007,18 @@ mad_decoder_scan_stream(InputStream &is, TagHandler &handler) noexcept
|
||||
return true;
|
||||
}
|
||||
|
||||
static const char *const mp3_suffixes[] = { "mp3", "mp2", nullptr };
|
||||
static const char *const mp3_mime_types[] = { "audio/mpeg", nullptr };
|
||||
static const char *const mad_suffixes[] = { "mp3", "mp2", nullptr };
|
||||
static const char *const mad_mime_types[] = { "audio/mpeg", nullptr };
|
||||
|
||||
const struct DecoderPlugin mad_decoder_plugin = {
|
||||
"mad",
|
||||
mp3_plugin_init,
|
||||
mad_plugin_init,
|
||||
nullptr,
|
||||
mp3_decode,
|
||||
mad_decode,
|
||||
nullptr,
|
||||
nullptr,
|
||||
mad_decoder_scan_stream,
|
||||
nullptr,
|
||||
mp3_suffixes,
|
||||
mp3_mime_types,
|
||||
mad_suffixes,
|
||||
mad_mime_types,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user