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
9191 } ;
9292
9393 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)
9595 { perror ("linux_open_dsp_device : set format ") ;
9696 exit (1) ;
9797 } ;
9898
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)
100100 { perror ("linux_open : channels ") ;
101101 exit (1) ;
102102 } ;
103103
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)
105105 { perror ("linux_open : sample rate ") ;
106106 exit (1) ;
107107 } ;

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