Apply patch from Yair K. to fix compiles with OSS v4.

This commit is contained in:
Erik de Castro Lopo 2008-01-20 15:27:14 +11:00
parent b26341a503
commit aa15a930f9
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2008-01-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* examples/sndfile-play.c
Apply patch from Yair K. to fix compiles with OSS v4.
2008-01-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* examples/sndfile-cmp.c

View File

@ -444,17 +444,17 @@ linux_open_dsp_device (int channels, int srate)
} ;
fmt = CPU_IS_BIG_ENDIAN ? AFMT_S16_BE : AFMT_S16_LE ;
if (ioctl (fd, SOUND_PCM_SETFMT, &fmt) != 0)
if (ioctl (fd, SNDCTL_DSP_SETFMT, &fmt) != 0)
{ perror ("linux_open_dsp_device : set format ") ;
exit (1) ;
} ;
if (ioctl (fd, SOUND_PCM_WRITE_CHANNELS, &channels) != 0)
if (ioctl (fd, SNDCTL_DSP_CHANNELS, &channels) != 0)
{ perror ("linux_open_dsp_device : channels ") ;
exit (1) ;
} ;
if (ioctl (fd, SOUND_PCM_WRITE_RATE, &srate) != 0)
if (ioctl (fd, SNDCTL_DSP_SPEED, &srate) != 0)
{ perror ("linux_open_dsp_device : sample rate ") ;
exit (1) ;
} ;