/* Checks for error and displays the error code if any */
bool IsOk(SLresult res) {
    if (SL_RESULT_SUCCESS != res) {
        const char *str = slesutResultToString(res);
        if (NULL == str)
            str = "unknown";
        fprintf(stderr, "IsOk failure: %s (0x%x), exiting\n", str, res);
        return false;
    }
    return true;
}
/* Checks for error. If any errors exit the application! */
void CheckErr(SLresult res) {
    if (SL_RESULT_SUCCESS != res) {
        const char *str = slesutResultToString(res);
        if (NULL == str)
            str = "unknown";
        fprintf(stderr, "CheckErr failure: %s (0x%x), exiting\n", str, res);
        //Fail the test case
        FAIL();
    }
}