# HG changeset patch # User Cristi Magherusan # Date 1202135754 -7200 # Node ID 0962a6325b9b06b85dd139a2741be82b73c837cc # Parent 6b854a93649cfdef2232f8ecd89d59dcb8dadb7a modified pulseaudio, but it only supports 16 and 32bit output diff -r 6b854a93649c -r 0962a6325b9b src/pulse_audio/pulse_audio.c --- a/src/pulse_audio/pulse_audio.c Mon Feb 04 15:54:01 2008 +0200 +++ b/src/pulse_audio/pulse_audio.c Mon Feb 04 16:35:54 2008 +0200 @@ -548,17 +548,43 @@ g_assert(!stream); g_assert(!connected); - if (fmt == FMT_U8) - ss.format = PA_SAMPLE_U8; - else if (fmt == FMT_S16_LE) - ss.format = PA_SAMPLE_S16LE; - else if (fmt == FMT_S16_BE) - ss.format = PA_SAMPLE_S16BE; - else if (fmt == FMT_S16_NE) - ss.format = PA_SAMPLE_S16NE; - else - return FALSE; - + switch(fmt) + { + case FMT_U8: + ss.format = PA_SAMPLE_U8; + break; + case FMT_S16_LE: + ss.format = PA_SAMPLE_S16LE; + break; + case FMT_S16_BE: + ss.format = PA_SAMPLE_S16BE; + break; + case FMT_S16_NE: + ss.format = PA_SAMPLE_S16NE; + break; +#if 0 /* pulseaudio only handles 16 and 32bit formats*/ + case FMT_S24_LE: + ss.format = PA_SAMPLE_S24LE; + break; + case FMT_S24_BE: + ss.format = PA_SAMPLE_S24BE; + break; + case FMT_S24_NE: + ss.format = PA_SAMPLE_S24NE; + break; +#endif + case FMT_S32_LE: + ss.format = PA_SAMPLE_S32LE; + break; + case FMT_S32_BE: + ss.format = PA_SAMPLE_S32BE; + break; + case FMT_S32_NE: + ss.format = PA_SAMPLE_S32NE; + break; + default: + return FALSE; + } ss.rate = rate; ss.channels = nch;