On Fri, 21 Aug 1998, James wrote:
> but it's crappy quality (sounds like 11025 8bit mono). Maybe that's the
> default for that and i need to change it.
I'm not sure. Try something like:
int S;
int desdsp;
if( (dspdes = open("/dev/dsp", O_RDONLY)) == -1)
{ /* clean up */ }
S = 40000; /* this being the requested sampling rate ? */
if (ioctl(dspdes, SNDCTL_DSP_SPEED, &S))
{ /* didn't work */}
/* S now contains acutal sampling rate ? */
Then read() as you normally would.
I think that when the sound device file is closed, the
sound card reverts back to a predefined sampling rate.
> Where can i find out about soundcard programming?
Outside of the driver source code ? Pass. The Sound howto
might have something on it.