mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2025-02-17 01:20:02 +00:00
Apply patch from Yair K. to fix compiles with OSS v4.
This commit is contained in:
parent
b26341a503
commit
aa15a930f9
@ -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
|
||||
|
@ -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) ;
|
||||
} ;
|
||||
|
Loading…
x
Reference in New Issue
Block a user