AL ERROR This function will return the current error state. Every function in DarkAL will set or change the error state according to what went wrong when the function was called. For example, when trying to load a sound file that does not exist, rather than exiting with a message prompt like standard DarkBASIC commands do, DarkAL will set its error state to 5 (failed to load audio file) and then carry on as normal, allowing you to handle the error/problem however you want to.
Syntax
    Return Integer = DS ERROR( *no parameters* )
Returns
Returns the error code status of DarkAL, as an integer value.
Parameters
No parameters required.
Error Codes
Each integer value that this function returns corrosponds to an error:
        0 - No error
        1 - Audio device not initialized
        2 - sound does not exist
        3 - failed to initialize 3D audio listener
        4 - Failed to initialize device - this occurs when darkSOUND has tried to initialize an audio/capture device, but failed
        5 - Failed to load audio file
        6 - Sound already exists
        7 - Sound was already playing
        8 - The given ID was out of range (i.e. sound/filter/effect ID)
        9 - seeking not supported (occurs when you tried to seek with codec/audio device that doesn't support seeking)
        10 - Cannot change device while already initialized
        11 - Device index must be greater than 0
        12 - DarkSOUND not started
        13 - Audio capture not supported on the current system
        14 - Failed to start audio capture
        15 - Audio capture device not initialized
        16 - Device already capturing
        17 - Sound data is corrupt (e.g. something went wrong while retrieving captured audio data or a sound file only half loaded)
        18 - filter already exists
        19 - failed to create filter
        20 - filter does not exist
        21 - Failed to create effect (usually occurs when the audio device had no free effect slots)
        22 - Effect already exists
        23 - N/A (reserved for future use)
        24 - Effect does not exist
See also
DarkAL Function Menu