comparison src/linuxplay.c @ 209:41ff10fd062f r20-4b3

Import from CVS: tag r20-4b3
author cvs
date Mon, 13 Aug 2007 10:04:58 +0200
parents 850242ba4a81
children 52952cbfc5b5
comparison
equal deleted inserted replaced
208:f427b8ec4379 209:41ff10fd062f
823 if (((i=fmt=AFMT_U8),ioctl(audio_fd,SNDCTL_DSP_SETFMT,&i)) < 0 || 823 if (((i=fmt=AFMT_U8),ioctl(audio_fd,SNDCTL_DSP_SETFMT,&i)) < 0 ||
824 fmt != i || ioctl(audio_fd,SNDCTL_DSP_SETFMT,&the_fmt) < 0 || 824 fmt != i || ioctl(audio_fd,SNDCTL_DSP_SETFMT,&the_fmt) < 0 ||
825 fmt != the_fmt) { 825 fmt != the_fmt) {
826 perror("SNDCTL_DSP_SETFMT"); 826 perror("SNDCTL_DSP_SETFMT");
827 return(0); } } 827 return(0); } }
828 else if (fmt == AFMT_MU_LAW && the_fmt == AFMT_U8 ) {
829 /* the kernel will convert for us */ }
828 else { 830 else {
829 perror("SNDCTL_DSP_SETFMT"); 831 perror("SNDCTL_DSP_SETFMT");
830 return(0); } } 832 return(0); } }
831 else if (fmt == AFMT_S8) { 833 else if (fmt == AFMT_S8) {
832 *sndcnv = sndcnv2unsigned; 834 *sndcnv = sndcnv2unsigned;