would it be possible to make the BASS-Errors human readable (at least the most common ones) ?
I had the problem that some Error occured while load my playlist and the reason was, that a network drive was not yet connected to my PC (it was already there but needed a logon with user/password). An error like “File not Found” or “Permission denied” would have made the situation much clearer especially while being on air and talking until the problem was found
And: Could you implement a “Retry” Button or an auto-retry every 2 or 3 seconds (or is this too dangerous) ?
I had to move the element out of place and back to let the player retry… all while being on air… not the best situation (but ok, i decided to use the 2.1.21 and not a stable version)
BASS.DLL itself does not provide human readable error messages, but the error codes are explained in the source code:
// Error codes returned by BASS_GetErrorCode()
BASS_OK = 0; // all is OK
BASS_ERROR_MEM = 1; // memory error
BASS_ERROR_FILEOPEN = 2; // can't open the file
BASS_ERROR_DRIVER = 3; // can't find a free sound driver
BASS_ERROR_BUFLOST = 4; // the sample buffer was lost - please report this!
BASS_ERROR_HANDLE = 5; // invalid handle
BASS_ERROR_FORMAT = 6; // unsupported sample format
BASS_ERROR_POSITION = 7; // invalid playback position
BASS_ERROR_INIT = 8; // BASS_Init has not been successfully called
BASS_ERROR_START = 9; // BASS_Start has not been successfully called
BASS_ERROR_ALREADY = 14; // already initialized/paused/whatever
BASS_ERROR_NOPAUSE = 16; // not paused
BASS_ERROR_NOCHAN = 18; // can't get a free channel
BASS_ERROR_ILLTYPE = 19; // an illegal type was specified
BASS_ERROR_ILLPARAM = 20; // an illegal parameter was specified
BASS_ERROR_NO3D = 21; // no 3D support
BASS_ERROR_NOEAX = 22; // no EAX support
BASS_ERROR_DEVICE = 23; // illegal device number
BASS_ERROR_NOPLAY = 24; // not playing
BASS_ERROR_FREQ = 25; // illegal sample rate
BASS_ERROR_NOTFILE = 27; // the stream is not a file stream
BASS_ERROR_NOHW = 29; // no hardware voices available
BASS_ERROR_EMPTY = 31; // the MOD music has no sequence data
BASS_ERROR_NONET = 32; // no internet connection could be opened
BASS_ERROR_CREATE = 33; // couldn't create the file
BASS_ERROR_NOFX = 34; // effects are not enabled
BASS_ERROR_PLAYING = 35; // the channel is playing
BASS_ERROR_NOTAVAIL = 37; // requested data is not available
BASS_ERROR_DECODE = 38; // the channel is a "decoding channel"
BASS_ERROR_DX = 39; // a sufficient DirectX version is not installed
BASS_ERROR_TIMEOUT = 40; // connection timedout
BASS_ERROR_FILEFORM = 41; // unsupported file format
BASS_ERROR_SPEAKER = 42; // unavailable speaker
BASS_ERROR_VERSION = 43; // invalid BASS version (used by add-ons)
BASS_ERROR_CODEC = 44; // codec is not available/supported
BASS_ERROR_UNKNOWN = -1; // some other mystery error
As you can see, all file open errors result in code 2, so you can’t tell “file not found” from “permission denied” anyway. Perhaps I can write an error handler that outputs these messages. Very boring work though
A retry button is not possible in the current architecture. However, you can run an error check on the item or the playlist (from the context menu), and if the file is accessible again then, the error status will be gone and you can load it into a player again.