From: Guenter B. <gu...@us...> - 2001-08-12 01:03:58
|
Update of /cvsroot/xine/xine-lib/src/audio_out In directory usw-pr-cvs1:/tmp/cvs-serv26589 Modified Files: audio_oss_out.c Log Message: make oss output check if sampling rate is supported and try 44100 hz if not Index: audio_oss_out.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/audio_out/audio_oss_out.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- audio_oss_out.c 2001/08/05 19:04:34 1.26 +++ audio_oss_out.c 2001/08/12 01:03:55 1.27 @@ -179,7 +179,16 @@ if(tmp > 44100) tmp = 44100; #endif - ioctl(this->audio_fd,SNDCTL_DSP_SPEED, &tmp); + if (ioctl(this->audio_fd,SNDCTL_DSP_SPEED, &tmp) == -1) { + + printf ("audio_oss_out: warning: sampling rate %d Hz not supported, trying 44100 Hz\n", this->input_sample_rate); + + tmp = 44100; + if (ioctl(this->audio_fd,SNDCTL_DSP_SPEED, &tmp) == -1) { + printf ("audio_oss_out: error: 44100 Hz sampling rate not supported\n"); + return -1; + } + } this->output_sample_rate = tmp; xprintf (VERBOSE|AUDIO, "audio_oss_out: audio rate : %d requested, %d provided by device/sec\n", |