示例#1
0
const char * CD_ErrorString(int code)
{
    switch (code) {
        case CD_Error:
            return CD_ErrorString(ErrorCode);

        case CD_Ok:
            return "No error.";

        case CD_InvalidCard:
            return "Invalid or unsupported card.";

        case CD_DriverError:
            return SoundDriver_CD_ErrorString(SoundDriver_CD_GetError());

        default:
            return "Unknown error code.";
    }
}
示例#2
0
const char * CD_ErrorString(int code)
{
    switch (code) {
        case CD_Error:
            // make sure not to create an endless loop here
            assert(ErrorCode != CD_Error);
            if(ErrorCode != CD_Error)
                return CD_ErrorString(ErrorCode);
            return "General CD error";

        case CD_Ok:
            return "No error.";

        case CD_InvalidCard:
            return "Invalid or unsupported card.";

        case CD_DriverError:
            return SoundDriver_CD_ErrorString(SoundDriver_CD_GetError());

        default:
            return "Unknown error code.";
    }
}