#
# Aura Engine (https://gitlab.servus.at/aura/engine)
#
# Copyright (C) 2017-2020 - The Aura Engine Team.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.


if bitrate == 24 then 
#    if stereo then
        ignore(output_filesystem_stereo(%fdkaac(bitrate = 24, channels = 2), filenamepattern, !source))
#    else
#        ignore(output_filesystem_mono(%fdkaac(bitrate = 24, channels = 1), filenamepattern, mean(!source)))
#    end
elsif bitrate == 32 then
#    if stereo then
        ignore(output_filesystem_stereo(%fdkaac(bitrate = 32, channels = 2), filenamepattern, !source))
#    else
#        ignore(output_filesystem_mono(%fdkaac(bitrate = 32, channels = 1), filenamepattern, mean(!source)))
#    end
elsif bitrate == 48 then
#    if stereo then
        ignore(output_filesystem_stereo(%fdkaac(bitrate = 48, channels = 2), filenamepattern, !source))
#    else
#        ignore(output_filesystem_mono(%fdkaac(bitrate = 48, channels = 1), filenamepattern, mean(!source)))
#    end
elsif bitrate == 64 then
#    if stereo then
        ignore(output_filesystem_stereo(%fdkaac(bitrate = 64, channels = 2), filenamepattern, !source))
#    else
#        ignore(output_filesystem_mono(%fdkaac(bitrate = 64, channels = 1), filenamepattern, mean(!source)))
#    end
elsif bitrate == 96 then
#    if stereo then
        ignore(output_filesystem_stereo(%fdkaac(bitrate = 96, channels = 2), filenamepattern, !source))
#    else
#        ignore(output_filesystem_mono(%fdkaac(bitrate = 96, channels = 1), filenamepattern, mean(!source)))
#    end
elsif bitrate == 128 then
#    if stereo then
        ignore(output_filesystem_stereo(%fdkaac(bitrate = 128, channels = 2), filenamepattern, !source))
#    else
#        ignore(output_filesystem_mono(%fdkaac(bitrate = 128, channels = 1), filenamepattern, mean(!source)))
#    end
elsif bitrate == 160 then
#    if stereo then
        ignore(output_filesystem_stereo(%fdkaac(bitrate = 160, channels = 2), filenamepattern, !source))
#    else
#        ignore(output_filesystem_mono(%fdkaac(bitrate = 160, channels = 1), filenamepattern, mean(!source)))
#    end
elsif bitrate == 192 then
#    if stereo then
        ignore(output_filesystem_stereo(%fdkaac(bitrate = 192, channels = 2), filenamepattern, !source))
#    else
#        ignore(output_filesystem_mono(%fdkaac(bitrate = 192, channels = 1), filenamepattern, mean(!source)))
#    end
elsif bitrate == 224 then
#    if stereo then
        ignore(output_filesystem_stereo(%fdkaac(bitrate = 224, channels = 2), filenamepattern, !source))
#    else
#        ignore(output_filesystem_mono(%fdkaac(bitrate = 224, channels = 1), filenamepattern, mean(!source)))
#    end
elsif bitrate == 256 then
#    if stereo then
        ignore(output_filesystem_stereo(%fdkaac(bitrate = 256, channels = 2), filenamepattern, !source))
#    else
#        ignore(output_filesystem_mono(%fdkaac(bitrate = 256, channels = 1), filenamepattern, mean(!source)))
#    end
elsif bitrate == 320 then
#    if stereo then
        ignore(output_filesystem_stereo(%fdkaac(bitrate = 320, channels = 2), filenamepattern, !source))
#    else
#        ignore(output_filesystem_mono(%fdkaac(bitrate = 320, channels = 1), filenamepattern, mean(!source)))
#    end
end