Merge pull request #706 from radiorabe/chore/cleanup-aac
Cleanup aac code
This commit is contained in:
commit
1a7eed1412
|
@ -1,68 +0,0 @@
|
|||
if bitrate == 24 then
|
||||
if stereo then
|
||||
ignore(output_stereo(%aac(bitrate = 24, channels = 2), !source))
|
||||
else
|
||||
ignore(output_mono(%aac(bitrate = 24, channels = 1), mean(!source)))
|
||||
end
|
||||
elsif bitrate == 32 then
|
||||
if stereo then
|
||||
ignore(output_stereo(%aac(bitrate = 32, channels = 2), !source))
|
||||
else
|
||||
ignore(output_mono(%aac(bitrate = 32, channels = 1), mean(!source)))
|
||||
end
|
||||
elsif bitrate == 48 then
|
||||
if stereo then
|
||||
ignore(output_stereo(%aac(bitrate = 48, channels = 2), !source))
|
||||
else
|
||||
ignore(output_mono(%aac(bitrate = 48, channels = 1), mean(!source)))
|
||||
end
|
||||
elsif bitrate == 64 then
|
||||
if stereo then
|
||||
ignore(output_stereo(%aac(bitrate = 64, channels = 2), !source))
|
||||
else
|
||||
ignore(output_mono(%aac(bitrate = 64, channels = 1), mean(!source)))
|
||||
end
|
||||
elsif bitrate == 96 then
|
||||
if stereo then
|
||||
ignore(output_stereo(%aac(bitrate = 96, channels = 2), !source))
|
||||
else
|
||||
ignore(output_mono(%aac(bitrate = 96, channels = 1), mean(!source)))
|
||||
end
|
||||
elsif bitrate == 128 then
|
||||
if stereo then
|
||||
ignore(output_stereo(%aac(bitrate = 128, channels = 2), !source))
|
||||
else
|
||||
ignore(output_mono(%aac(bitrate = 128, channels = 1), mean(!source)))
|
||||
end
|
||||
elsif bitrate == 160 then
|
||||
if stereo then
|
||||
ignore(output_stereo(%aac(bitrate = 160, channels = 2), !source))
|
||||
else
|
||||
ignore(output_mono(%aac(bitrate = 160, channels = 1), mean(!source)))
|
||||
end
|
||||
elsif bitrate == 192 then
|
||||
if stereo then
|
||||
ignore(output_stereo(%aac(bitrate = 192, channels = 2), !source))
|
||||
else
|
||||
ignore(output_mono(%aac(bitrate = 192, channels = 1), mean(!source)))
|
||||
end
|
||||
elsif bitrate == 224 then
|
||||
if stereo then
|
||||
ignore(output_stereo(%aac(bitrate = 224, channels = 2), !source))
|
||||
else
|
||||
ignore(output_mono(%aac(bitrate = 224, channels = 1), mean(!source)))
|
||||
end
|
||||
elsif bitrate == 256 then
|
||||
if stereo then
|
||||
ignore(output_stereo(%aac(bitrate = 256, channels = 2), !source))
|
||||
else
|
||||
ignore(output_mono(%aac(bitrate = 256, channels = 1), mean(!source)))
|
||||
end
|
||||
elsif bitrate == 320 then
|
||||
if stereo then
|
||||
ignore(output_stereo(%aac(bitrate = 320, channels = 2), !source))
|
||||
else
|
||||
ignore(output_mono(%aac(bitrate = 320, channels = 1), mean(!source)))
|
||||
end
|
||||
end
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
if bitrate == 24 then
|
||||
if stereo then
|
||||
ignore(output_stereo(%aacplus(bitrate = 24, channels = 2), !source))
|
||||
else
|
||||
ignore(output_mono(%aacplus(bitrate = 24, channels = 1), mean(!source)))
|
||||
end
|
||||
elsif bitrate == 32 then
|
||||
if stereo then
|
||||
ignore(output_stereo(%aacplus(bitrate = 32, channels = 2), !source))
|
||||
else
|
||||
ignore(output_mono(%aacplus(bitrate = 32, channels = 1), mean(!source)))
|
||||
end
|
||||
elsif bitrate == 48 then
|
||||
if stereo then
|
||||
ignore(output_stereo(%aacplus(bitrate = 48, channels = 2), !source))
|
||||
else
|
||||
ignore(output_mono(%aacplus(bitrate = 48, channels = 1), mean(!source)))
|
||||
end
|
||||
elsif bitrate == 64 then
|
||||
if stereo then
|
||||
ignore(output_stereo(%aacplus(bitrate = 64, channels = 2), !source))
|
||||
else
|
||||
ignore(output_mono(%aacplus(bitrate = 64, channels = 1), mean(!source)))
|
||||
end
|
||||
elsif bitrate == 96 then
|
||||
if stereo then
|
||||
ignore(output_stereo(%aacplus(bitrate = 96, channels = 2), !source))
|
||||
else
|
||||
ignore(output_mono(%aacplus(bitrate = 96, channels = 1), mean(!source)))
|
||||
end
|
||||
elsif bitrate == 128 then
|
||||
if stereo then
|
||||
ignore(output_stereo(%aacplus(bitrate = 128, channels = 2), !source))
|
||||
else
|
||||
ignore(output_mono(%aacplus(bitrate = 128, channels = 1), mean(!source)))
|
||||
end
|
||||
elsif bitrate == 160 then
|
||||
if stereo then
|
||||
ignore(output_stereo(%aacplus(bitrate = 160, channels = 2), !source))
|
||||
else
|
||||
ignore(output_mono(%aacplus(bitrate = 160, channels = 1), mean(!source)))
|
||||
end
|
||||
elsif bitrate == 192 then
|
||||
if stereo then
|
||||
ignore(output_stereo(%aacplus(bitrate = 192, channels = 2), !source))
|
||||
else
|
||||
ignore(output_mono(%aacplus(bitrate = 192, channels = 1), mean(!source)))
|
||||
end
|
||||
elsif bitrate == 224 then
|
||||
if stereo then
|
||||
ignore(output_stereo(%aacplus(bitrate = 224, channels = 2), !source))
|
||||
else
|
||||
ignore(output_mono(%aacplus(bitrate = 224, channels = 1), mean(!source)))
|
||||
end
|
||||
elsif bitrate == 256 then
|
||||
if stereo then
|
||||
ignore(output_stereo(%aacplus(bitrate = 256, channels = 2), !source))
|
||||
else
|
||||
ignore(output_mono(%aacplus(bitrate = 256, channels = 1), mean(!source)))
|
||||
end
|
||||
elsif bitrate == 320 then
|
||||
if stereo then
|
||||
ignore(output_stereo(%aacplus(bitrate = 320, channels = 2), !source))
|
||||
else
|
||||
ignore(output_mono(%aacplus(bitrate = 320, channels = 1), mean(!source)))
|
||||
end
|
||||
end
|
||||
|
|
@ -154,20 +154,6 @@ def output_to(output_type, type, bitrate, host, port, pass, mount_point, url, de
|
|||
end
|
||||
%endif
|
||||
|
||||
# FDK-AAC is the only good AAC encoder. libvoaac is deprecated and aacplus is subpar.
|
||||
# The difference in compression quality is clearly audible. -- Albert
|
||||
# %ifencoder %aac
|
||||
# if type == "aac" then
|
||||
# %include "aac.liq"
|
||||
# end
|
||||
# %endif
|
||||
|
||||
# %ifencoder %aacplus
|
||||
# if type == "aacplus" then
|
||||
# %include "aacplus.liq"
|
||||
# end
|
||||
# %endif
|
||||
|
||||
%ifencoder %fdkaac
|
||||
if type == "aac" then
|
||||
%include "fdkaac.liq"
|
||||
|
@ -207,15 +193,9 @@ def output_to(output_type, type, bitrate, host, port, pass, mount_point, url, de
|
|||
%include "mp3.liq"
|
||||
end
|
||||
|
||||
%ifencoder %aac
|
||||
%ifencoder %fdkaac
|
||||
if type == "aac" then
|
||||
%include "aac.liq"
|
||||
end
|
||||
%endif
|
||||
|
||||
%ifencoder %aacplus
|
||||
if type == "aacplus" then
|
||||
%include "aacplus.liq"
|
||||
%include "fdkaac.liq"
|
||||
end
|
||||
%endif
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue