History

examples/audio_out.c : Apply patch to fix compile problems with OSS v4.

Erik de Castro Lopo committed 18 years ago

Commit d61c0471 parent 708f7b62 files · +8 −3Browse files

Showing the changes to examples (1 of 2 files). Show all

Unified · Split

examples/audio_out.c+3−3
@@ -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 } ;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t