
/' ============================================================================================== '/
/' FMOD Ex - Error string header file. Copyright (c), Firelight Technologies Pty, Ltd. 2004-2011. '/
/'                                                                                                '/
/' Use this header if you want to store or display a string version / english explanation of      '/
/' the FMOD error codes.                                                                          '/
/'                                                                                                '/
/' ============================================================================================== '/

#ifndef _FMOD_ERRORS_BI
#define _FMOD_ERRORS_BI

#include "fmodex.bi"


private function FMOD_ErrorString(byval errcode as FMOD_RESULT) as const zstring ptr
    select case errcode
            case FMOD_ERR_ALREADYLOCKED:          function = @"Tried to call lock a second time before unlock was called. "
        case FMOD_ERR_BADCOMMAND:             function = @"Tried to call a function on a data type that does not allow this type of functionality (ie calling Sound::lock on a streaming sound). "
        case FMOD_ERR_CDDA_DRIVERS:           function = @"Neither NTSCSI nor ASPI could be initialised. "
        case FMOD_ERR_CDDA_INIT:              function = @"An error occurred while initialising the CDDA subsystem. "
        case FMOD_ERR_CDDA_INVALID_DEVICE:    function = @"Couldn't find the specified device. "
        case FMOD_ERR_CDDA_NOAUDIO:           function = @"No audio tracks on the specified disc. "
        case FMOD_ERR_CDDA_NODEVICES:         function = @"No CD/DVD devices were found. "
        case FMOD_ERR_CDDA_NODISC:            function = @"No disc present in the specified drive. "
        case FMOD_ERR_CDDA_READ:              function = @"A CDDA read error occurred. "
        case FMOD_ERR_CHANNEL_ALLOC:          function = @"Error trying to allocate a channel. "
        case FMOD_ERR_CHANNEL_STOLEN:         function = @"The specified channel has been reused to play another sound. "
        case FMOD_ERR_COM:                    function = @"A Win32 COM related error occured. COM failed to initialize or a QueryInterface failed meaning a Windows codec or driver was not installed properly. "
        case FMOD_ERR_DMA:                    function = @"DMA Failure.  See debug output for more information. "
        case FMOD_ERR_DSP_CONNECTION:         function = @"DSP connection error.  Connection possibly caused a cyclic dependancy.  Or tried to connect a tree too many units deep (more than 128). "
        case FMOD_ERR_DSP_FORMAT:             function = @"DSP Format error.  A DSP unit may have attempted to connect to this network with the wrong format. "
        case FMOD_ERR_DSP_NOTFOUND:           function = @"DSP connection error.  Couldn't find the DSP unit specified. "
        case FMOD_ERR_DSP_RUNNING:            function = @"DSP error.  Cannot perform this operation while the network is in the middle of running.  This will most likely happen if a connection or disconnection is attempted in a DSP callback. "
        case FMOD_ERR_DSP_TOOMANYCONNECTIONS: function = @"DSP connection error.  The unit being connected to or disconnected should only have 1 input or output. "
        case FMOD_ERR_EVENT_ALREADY_LOADED:   function = @"The specified project or bank has already been loaded. Having multiple copies of the same project loaded simultaneously is forbidden. "
        case FMOD_ERR_EVENT_FAILED:           function = @"An Event failed to be retrieved, most likely due to 'just fail' being specified as the max playbacks behavior. "
        case FMOD_ERR_EVENT_GUIDCONFLICT:     function = @"An event with the same GUID already exists. "
        case FMOD_ERR_EVENT_INFOONLY:         function = @"Can't execute this command on an EVENT_INFOONLY event. "
        case FMOD_ERR_EVENT_INTERNAL:         function = @"An error occured that wasn't supposed to.  See debug log for reason. "
        case FMOD_ERR_EVENT_MAXSTREAMS:       function = @"Event failed because 'Max streams' was hit when FMOD_EVENT_INIT_FAIL_ON_MAXSTREAMS was specified. "
        case FMOD_ERR_EVENT_MISMATCH:         function = @"FSB mismatches the FEV it was compiled with, the stream/sample mode it was meant to be created with was different, or the FEV was built for a different platform. "
        case FMOD_ERR_EVENT_NAMECONFLICT:     function = @"A category with the same name already exists. "
        case FMOD_ERR_EVENT_NEEDSSIMPLE:      function = @"Tried to call a function on a complex event that's only supported by simple events. "
        case FMOD_ERR_EVENT_NOTFOUND:         function = @"The requested event, event group, event category or event property could not be found. "
        case FMOD_ERR_FILE_BAD:               function = @"Error loading file. "
        case FMOD_ERR_FILE_COULDNOTSEEK:      function = @"Couldn't perform seek operation.  This is a limitation of the medium (ie netstreams) or the file format. "
        case FMOD_ERR_FILE_DISKEJECTED:       function = @"Media was ejected while reading. "
        case FMOD_ERR_FILE_EOF:               function = @"End of file unexpectedly reached while trying to read essential data (truncated data?). "
        case FMOD_ERR_FILE_NOTFOUND:          function = @"File not found. "
        case FMOD_ERR_FILE_UNWANTED:          function = @"Unwanted file access occured. "
        case FMOD_ERR_FORMAT:                 function = @"Unsupported file or audio format. "
        case FMOD_ERR_HTTP:                   function = @"A HTTP error occurred. This is a catch-all for HTTP errors not listed elsewhere. "
        case FMOD_ERR_HTTP_ACCESS:            function = @"The specified resource requires authentication or is forbidden. "
        case FMOD_ERR_HTTP_PROXY_AUTH:        function = @"Proxy authentication is required to access the specified resource. "
        case FMOD_ERR_HTTP_SERVER_ERROR:      function = @"A HTTP server error occurred. "
        case FMOD_ERR_HTTP_TIMEOUT:           function = @"The HTTP request timed out. "
        case FMOD_ERR_INITIALIZATION:         function = @"FMOD was not initialized correctly to support this function. "
        case FMOD_ERR_INITIALIZED:            function = @"Cannot call this command after System::init. "
        case FMOD_ERR_INTERNAL:               function = @"An error occured that wasn't supposed to.  Contact support. "
        case FMOD_ERR_INVALID_ADDRESS:        function = @"On Xbox 360, this memory address passed to FMOD must be physical, (ie allocated with XPhysicalAlloc.) "
        case FMOD_ERR_INVALID_FLOAT:          function = @"Value passed in was a NaN, Inf or denormalized float. "
        case FMOD_ERR_INVALID_HANDLE:         function = @"An invalid object handle was used. "
        case FMOD_ERR_INVALID_PARAM:          function = @"An invalid parameter was passed to this function. "
        case FMOD_ERR_INVALID_POSITION:       function = @"An invalid seek position was passed to this function. "
        case FMOD_ERR_INVALID_SPEAKER:        function = @"An invalid speaker was passed to this function based on the current speaker mode. "
        case FMOD_ERR_INVALID_SYNCPOINT:      function = @"The syncpoint did not come from this sound handle. "
        case FMOD_ERR_INVALID_VECTOR:         function = @"The vectors passed in are not unit length, or perpendicular. "
        case FMOD_ERR_MAXAUDIBLE:             function = @"Reached maximum audible playback count for this sound's soundgroup. "
        case FMOD_ERR_MEMORY:                 function = @"Not enough memory or resources. "
        case FMOD_ERR_MEMORY_CANTPOINT:       function = @"Can't use FMOD_OPENMEMORY_POINT on non PCM source data, or non mp3/xma/adpcm data if FMOD_CREATECOMPRESSEDSAMPLE was used. "
        case FMOD_ERR_MEMORY_SRAM:            function = @"Not enough memory or resources on console sound ram. "
        case FMOD_ERR_MUSIC_NOCALLBACK:       function = @"The music callback is required, but it has not been set. "
        case FMOD_ERR_MUSIC_NOTFOUND:         function = @"The requested music entity could not be found. "
        case FMOD_ERR_MUSIC_UNINITIALIZED:    function = @"Music system is not initialized probably because no music data is loaded. "
        case FMOD_ERR_NEEDS2D:                function = @"Tried to call a command on a 3d sound when the command was meant for 2d sound. "
        case FMOD_ERR_NEEDS3D:                function = @"Tried to call a command on a 2d sound when the command was meant for 3d sound. "
        case FMOD_ERR_NEEDSHARDWARE:          function = @"Tried to use a feature that requires hardware support.  (ie trying to play a GCADPCM compressed sound in software on Wii). "
        case FMOD_ERR_NEEDSSOFTWARE:          function = @"Tried to use a feature that requires the software engine.  Software engine has either been turned off, or command was executed on a hardware channel which does not support this feature. "
        case FMOD_ERR_NET_CONNECT:            function = @"Couldn't connect to the specified host. "
        case FMOD_ERR_NET_SOCKET_ERROR:       function = @"A socket error occurred.  This is a catch-all for socket-related errors not listed elsewhere. "
        case FMOD_ERR_NET_URL:                function = @"The specified URL couldn't be resolved. "
        case FMOD_ERR_NET_WOULD_BLOCK:        function = @"Operation on a non-blocking socket could not complete immediately. "
        case FMOD_ERR_NOTREADY:               function = @"Operation could not be performed because specified sound/DSP connection is not ready. "
        case FMOD_ERR_OUTPUT_ALLOCATED:       function = @"Error initializing output device, but more specifically, the output device is already in use and cannot be reused. "
        case FMOD_ERR_OUTPUT_CREATEBUFFER:    function = @"Error creating hardware sound buffer. "
        case FMOD_ERR_OUTPUT_DRIVERCALL:      function = @"A call to a standard soundcard driver failed, which could possibly mean a bug in the driver or resources were missing or exhausted. "
        case FMOD_ERR_OUTPUT_ENUMERATION:     function = @"Error enumerating the available driver list. List may be inconsistent due to a recent device addition or removal. "
        case FMOD_ERR_OUTPUT_FORMAT:          function = @"Soundcard does not support the minimum features needed for this soundsystem (16bit stereo output). "
        case FMOD_ERR_OUTPUT_INIT:            function = @"Error initializing output device. "
        case FMOD_ERR_OUTPUT_NOHARDWARE:      function = @"FMOD_HARDWARE was specified but the sound card does not have the resources necessary to play it. "
        case FMOD_ERR_OUTPUT_NOSOFTWARE:      function = @"Attempted to create a software sound but no software channels were specified in System::init. "
        case FMOD_ERR_PAN:                    function = @"Panning only works with mono or stereo sound sources. "
        case FMOD_ERR_PLUGIN:                 function = @"An unspecified error has been returned from a 3rd party plugin. "
        case FMOD_ERR_PLUGIN_INSTANCES:       function = @"The number of allowed instances of a plugin has been exceeded. "
        case FMOD_ERR_PLUGIN_MISSING:         function = @"A requested output, dsp unit type or codec was not available. "
        case FMOD_ERR_PLUGIN_RESOURCE:        function = @"A resource that the plugin requires cannot be found. (ie the DLS file for MIDI playback) "
        case FMOD_ERR_PRELOADED:              function = @"The specified sound is still in use by the event system, call EventSystem::unloadFSB before trying to release it. "
        case FMOD_ERR_PROGRAMMERSOUND:        function = @"The specified sound is still in use by the event system, wait for the event which is using it finish with it. "
        case FMOD_ERR_RECORD:                 function = @"An error occured trying to initialize the recording device. "
        case FMOD_ERR_REVERB_INSTANCE:        function = @"Specified instance in FMOD_REVERB_PROPERTIES couldn't be set. Most likely because it is an invalid instance number or the reverb doesnt exist. "
        case FMOD_ERR_SUBSOUNDS:              function = @"The error occured because the sound referenced contains subsounds when it shouldn't have, or it doesn't contain subsounds when it should have.  The operation may also not be able to be performed on a parent sound, or a parent sound was played without setting up a sentence first. "
        case FMOD_ERR_SUBSOUND_ALLOCATED:     function = @"This subsound is already being used by another sound, you cannot have more than one parent to a sound.  Null out the other parent's entry first. "
        case FMOD_ERR_SUBSOUND_CANTMOVE:      function = @"Shared subsounds cannot be replaced or moved from their parent stream, such as when the parent stream is an FSB file. "
        case FMOD_ERR_SUBSOUND_MODE:          function = @"The subsound's mode bits do not match with the parent sound's mode bits.  See documentation for function that it was called with. "
        case FMOD_ERR_TAGNOTFOUND:            function = @"The specified tag could not be found or there are no tags. "
        case FMOD_ERR_TOOMANYCHANNELS:        function = @"The sound created exceeds the allowable input channel count.  This can be increased using the maxinputchannels parameter in System::setSoftwareFormat. "
        case FMOD_ERR_UNIMPLEMENTED:          function = @"Something in FMOD hasn't been implemented when it should be! contact support! "
        case FMOD_ERR_UNINITIALIZED:          function = @"This command failed because System::init or System::setDriver was not called. "
        case FMOD_ERR_UNSUPPORTED:            function = @"A command issued was not supported by this object.  Possibly a plugin without certain callbacks specified. "
        case FMOD_ERR_UPDATE:                 function = @"An error caused by System::update occured. "
        case FMOD_ERR_VERSION:                function = @"The version number of this file format is not supported. "
        case FMOD_OK:                         function = @"No errors."
        case else :                             function = @"Unknown error."
    end select
end function

#endif
