Showing the changes to examples (1 of 2 files). Show all
Unified · Split
| @@ -91,17 +91,17 @@ linux_open (int channels, int samplerate) · 90 unmodified lines | |||
| 91 | } ; | 91 | } ; |
| 92 | 92 | ||
| 93 | fmt = CPU_IS_BIG_ENDIAN ? AFMT_S16_BE : AFMT_S16_LE ; | 93 | fmt = CPU_IS_BIG_ENDIAN ? AFMT_S16_BE : AFMT_S16_LE ; |
| 94 | if (ioctl (linux_out->fd, SOUND_PCM_SETFMT, &fmt) != 0) | 94 | if (ioctl (linux_out->fd, SNDCTL_DSP_SETFMT, &fmt) != 0) |
| 95 | { perror ("linux_open_dsp_device : set format ") ; | 95 | { perror ("linux_open_dsp_device : set format ") ; |
| 96 | exit (1) ; | 96 | exit (1) ; |
| 97 | } ; | 97 | } ; |
| 98 | 98 | ||
| 99 | if ((error = ioctl (linux_out->fd, SOUND_PCM_WRITE_CHANNELS, &channels)) != 0) | 99 | if ((error = ioctl (linux_out->fd, SNDCTL_DSP_CHANNELS, &channels)) != 0) |
| 100 | { perror ("linux_open : channels ") ; | 100 | { perror ("linux_open : channels ") ; |
| 101 | exit (1) ; | 101 | exit (1) ; |
| 102 | } ; | 102 | } ; |
| 103 | 103 | ||
| 104 | if ((error = ioctl (linux_out->fd, SOUND_PCM_WRITE_RATE, &samplerate)) != 0) | 104 | if ((error = ioctl (linux_out->fd, SNDCTL_DSP_SPEED, &samplerate)) != 0) |
| 105 | { perror ("linux_open : sample rate ") ; | 105 | { perror ("linux_open : sample rate ") ; |
| 106 | exit (1) ; | 106 | exit (1) ; |
| 107 | } ; | 107 | } ; |