Logo Search packages:      
Sourcecode: pulseaudio version File versions

int pa_sample_format_is_le ( pa_sample_format_t  f  ) 

Return 1 when the specified format is little endian, return -1 when endianess does not apply to this format.

Since:
0.9.16

Definition at line 245 of file sample.c.

References PA_SAMPLE_FLOAT32BE, PA_SAMPLE_FLOAT32LE, PA_SAMPLE_MAX, PA_SAMPLE_S16BE, PA_SAMPLE_S16LE, PA_SAMPLE_S24_32BE, PA_SAMPLE_S24_32LE, PA_SAMPLE_S24BE, PA_SAMPLE_S24LE, PA_SAMPLE_S32BE, PA_SAMPLE_S32LE, and PA_SAMPLE_U8.

                                                 {
    pa_assert(f >= PA_SAMPLE_U8);
    pa_assert(f < PA_SAMPLE_MAX);

    switch (f) {
        case PA_SAMPLE_S16LE:
        case PA_SAMPLE_S24LE:
        case PA_SAMPLE_S32LE:
        case PA_SAMPLE_S24_32LE:
        case PA_SAMPLE_FLOAT32LE:
            return 1;

        case PA_SAMPLE_S16BE:
        case PA_SAMPLE_S24BE:
        case PA_SAMPLE_S32BE:
        case PA_SAMPLE_S24_32BE:
        case PA_SAMPLE_FLOAT32BE:
            return 0;

        default:
            return -1;
    }
}


Generated by  Doxygen 1.6.0   Back to index