| 1087 | } |
| 1088 | |
| 1089 | const char* Sound_GetBassErrorString(int errorCode) |
| 1090 | { |
| 1091 | switch (errorCode) |
| 1092 | { |
| 1093 | case BASS_OK: return "Success"; |
| 1094 | case BASS_ERROR_MEM: return "Memory error"; |
| 1095 | case BASS_ERROR_FILEOPEN: return "Can't open the file"; |
| 1096 | case BASS_ERROR_DRIVER: return "Sound device driver is not available"; |
| 1097 | case BASS_ERROR_BUFLOST: return "The sample buffer was lost"; |
| 1098 | case BASS_ERROR_HANDLE: return "Invalid handle"; |
| 1099 | case BASS_ERROR_FORMAT: return "Unsupported sample format"; |
| 1100 | case BASS_ERROR_POSITION: return "Invalid position"; |
| 1101 | case BASS_ERROR_INIT: return "BASS_Init has not been successfully called"; |
| 1102 | case BASS_ERROR_START: return "BASS_Start has not been successfully called"; |
| 1103 | case BASS_ERROR_ALREADY: return "Target state is already set"; |
| 1104 | case BASS_ERROR_NOCHAN: return "Can't get a free channel"; |
| 1105 | case BASS_ERROR_ILLTYPE: return "Illegal type"; |
| 1106 | case BASS_ERROR_ILLPARAM: return "Illegal parameter"; |
| 1107 | case BASS_ERROR_NO3D: return "No 3D support"; |
| 1108 | case BASS_ERROR_NOEAX: return "No EAX support"; |
| 1109 | case BASS_ERROR_DEVICE: return "Incorrect device ID or device error"; |
| 1110 | case BASS_ERROR_NOPLAY: return "Not playing"; |
| 1111 | case BASS_ERROR_FREQ: return "Illegal sample rate"; |
| 1112 | case BASS_ERROR_NOTFILE: return "The stream is not a file stream"; |
| 1113 | case BASS_ERROR_NOHW: return "No hardware voices available"; |
| 1114 | case BASS_ERROR_EMPTY: return "The MOD music has no sequence data"; |
| 1115 | case BASS_ERROR_NONET: return "No internet connection could be opened"; |
| 1116 | case BASS_ERROR_CREATE: return "Couldn't create the file"; |
| 1117 | case BASS_ERROR_NOFX: return "Effects are not enabled"; |
| 1118 | case BASS_ERROR_NOTAVAIL: return "Requested data is not available"; |
| 1119 | case BASS_ERROR_DECODE: return "The channel is a decoding channel"; |
| 1120 | case BASS_ERROR_DX: return "A sufficient DirectX version is not installed"; |
| 1121 | case BASS_ERROR_TIMEOUT: return "Connection timed out"; |
| 1122 | case BASS_ERROR_FILEFORM: return "Unsupported file format"; |
| 1123 | case BASS_ERROR_SPEAKER: return "Unavailable speaker"; |
| 1124 | case BASS_ERROR_VERSION: return "Invalid BASS version requested by a plugin"; |
| 1125 | case BASS_ERROR_CODEC: return "Codec is not available or supported"; |
| 1126 | case BASS_ERROR_ENDED: return "The channel or file has ended"; |
| 1127 | case BASS_ERROR_BUSY: return "The device is busy"; |
| 1128 | case BASS_ERROR_UNKNOWN: return "Unknown error"; |
| 1129 | default: return "Unknown error code"; |
| 1130 | } |
| 1131 | } |
| 1132 | |
| 1133 | bool Sound_CheckBASSError(const char* message, bool verbose, ...) |
| 1134 | { |
no outgoing calls
no test coverage detected