Logo Search packages:      
Sourcecode: pulseaudio version File versions

const char* pa_sample_format_to_string ( pa_sample_format_t  f  ) 

Return a descriptive string for the specified sample format.

Since:
0.8

Definition at line 117 of file sample.c.

References PA_SAMPLE_ALAW, PA_SAMPLE_FLOAT32BE, PA_SAMPLE_FLOAT32LE, PA_SAMPLE_MAX, PA_SAMPLE_S16BE, PA_SAMPLE_S16LE, PA_SAMPLE_S32BE, PA_SAMPLE_S32LE, PA_SAMPLE_U8, and PA_SAMPLE_ULAW.

                                                             {
    static const char* const table[]= {
        [PA_SAMPLE_U8] = "u8",
        [PA_SAMPLE_ALAW] = "aLaw",
        [PA_SAMPLE_ULAW] = "uLaw",
        [PA_SAMPLE_S16LE] = "s16le",
        [PA_SAMPLE_S16BE] = "s16be",
        [PA_SAMPLE_FLOAT32LE] = "float32le",
        [PA_SAMPLE_FLOAT32BE] = "float32be",
        [PA_SAMPLE_S32LE] = "s32le",
        [PA_SAMPLE_S32BE] = "s32be",
    };

    if (f < 0 || f >= PA_SAMPLE_MAX)
        return NULL;

    return table[f];
}


Generated by  Doxygen 1.6.0   Back to index