#ifndef _FSBANK_ERRORS_H
#define _FSBANK_ERRORS_H

#include "fsbank.bi"

function FSBank_ErrorString(byval result as FSBANK_RESULT) as const zstring ptr
    select case result
        case FSBANK_OK:                                 function = @"No errors.";
        case FSBANK_ERR_CACHE_CHUNKNOTFOUND:            function = @"An expected chunk is missing from the cache, perhaps try deleting cache files.";
        case FSBANK_ERR_CANCELLED:                      function = @"The build process was cancelled during compilation by the user.";
        case FSBANK_ERR_CANNOT_CONTINUE:                function = @"The build process cannot continue due to previously ignored errors.";
        case FSBANK_ERR_ENCODER:                        function = @"Encoder for chosen format has encountered an unexpected error.";
        case FSBANK_ERR_ENCODER_INIT:                   function = @"Encoder initialization failed.";
        case FSBANK_ERR_ENCODER_NOTSUPPORTED:           function = @"Encoder for chosen format is not supported on this platform.";
        case FSBANK_ERR_FILE_OS:                        function = @"An operating system based file error was encountered.";
        case FSBANK_ERR_FILE_NOTFOUND:                  function = @"A specified file could not be found.";
        case FSBANK_ERR_FMOD:                           function = @"Internal error from FMOD sub-system.";
        case FSBANK_ERR_INITIALIZED:                    function = @"Already initialized.";
        case FSBANK_ERR_INVALID_FORMAT:                 function = @"The format of the source file is invalid, see output for details.";
        case FSBANK_ERR_INVALID_PARAM:                  function = @"An invalid parameter has been passed to this function.";
        case FSBANK_ERR_MEMORY:                         function = @"Run out of memory.";
        case FSBANK_ERR_UNINITIALIZED:                  function = @"Not initialized yet.";
        case FSBANK_ERR_WRITER_FORMAT:                  function = @"Chosen encode format is not supported by this FSB version.";
        case FSBANK_WARN_CANNOTLOOP:                    function = @"Source file is too short for seamless looping. Looping disabled.";
        case FSBANK_WARN_IGNORED_OPTIMIZESAMPLERATE:    function = @"FSBANK_BUILD_OPTIMIZESAMPLERATE flag ignored: MP2, MP3 and CELT formats, and the USEBASICHEADERS flag make this option irrelevant.";
        case FSBANK_WARN_IGNORED_FILTERHIGHFREQ:        function = @"FSBANK_BUILD_FILTERHIGHFREQ flag ignored: feature only supported by XMA format.";
        case FSBANK_WARN_IGNORED_DISABLESEEKING:        function = @"FSBANK_BUILD_DISABLESEEKING flag ignored: feature only supported by XMA format.";
        case FSBANK_WARN_IGNORED_DONTINTERLEAVE:        function = @"FSBANK_BUILD_DONTINTERLEAVE flag ignored: feature only supported by VAG and GCADPCM formats.";
        case else
                                                function = @"Unknown error.";
    end select
end function

#endif // _FSBANK_ERRORS_H
