static int audio_validate_settings (audsettings_t *as)

{

    int invalid;



    invalid = as->nchannels != 1 && as->nchannels != 2;

    invalid |= as->endianness != 0 && as->endianness != 1;



    switch (as->fmt) {

    case AUD_FMT_S8:

    case AUD_FMT_U8:

    case AUD_FMT_S16:

    case AUD_FMT_U16:

    case AUD_FMT_S32:

    case AUD_FMT_U32:

        break;

    default:

        invalid = 1;

        break;

    }



    invalid |= as->freq <= 0;

    return invalid ? -1 : 0;

}

static int audio_validate_settings (audsettings_t *as)

{

    int invalid;



    invalid = as->nchannels != 1 && as->nchannels != 2;

    invalid |= as->endianness != 0 && as->endianness != 1;



    switch (as->fmt) {

    case AUD_FMT_S8:

    case AUD_FMT_U8:

    case AUD_FMT_S16:

    case AUD_FMT_U16:

    case AUD_FMT_S32:

    case AUD_FMT_U32:

        break;

    default:

        invalid = 1;

        break;

    }



    invalid |= as->freq <= 0;

    return invalid ? -1 : 0;

}

static int FUNC_0 (audsettings_t *VAR_0)

{

    int VAR_1;



    VAR_1 = VAR_0->nchannels != 1 && VAR_0->nchannels != 2;

    VAR_1 |= VAR_0->endianness != 0 && VAR_0->endianness != 1;



    switch (VAR_0->fmt) {

    case AUD_FMT_S8:

    case AUD_FMT_U8:

    case AUD_FMT_S16:

    case AUD_FMT_U16:

    case AUD_FMT_S32:

    case AUD_FMT_U32:

        break;

    default:

        VAR_1 = 1;

        break;

    }



    VAR_1 |= VAR_0->freq <= 0;

    return VAR_1 ? -1 : 0;

}

static int FUNC_0 (audsettings_t *VAR_0)
{ int VAR_1; VAR_1 = VAR_0->nchannels != 1 && VAR_0->nchannels != 2; VAR_1 |= VAR_0->endianness != 0 && VAR_0->endianness != 1; switch (VAR_0->fmt) { case AUD_FMT_S8:
case AUD_FMT_U8:
case AUD_FMT_S16:
case AUD_FMT_U16:
case AUD_FMT_S32:
case AUD_FMT_U32:
break; default:
VAR_1 = 1; break; } VAR_1 |= VAR_0->freq <= 0; return VAR_1 ? -1 : 0; }