Re: sun4c audio in 4.5
[email protected] (Christian Weisgerber)
| Newsgroups | gmane.os.openbsd.sparc |
|---|---|
| Message-ID | <[email protected]> |
Alexandre Ratchov <[email protected]> wrote: > - if (p->sample_rate < 7500 || p->sample_rate > 8500 || > - p->encoding != AUDIO_ENCODING_ULAW || > - p->precision != 8 || > - p->channels != 1) > - return (EINVAL); > - p->sample_rate = 8000; /* no other rates supported by amd chip */ > - > + if (setmode & AUDIO_PLAY) { > + p->sample_rate = 8000; > + p->encoding = AUDIO_ENCODING_ULINEAR; > + p->precision = 8; > + p->channels = 1; > + p->sw_code = ulinear8_to_mulaw; Since mu-law is a companding of 14-bit linear audio, wouldn't it make more sense to emulate s16? -- Christian "naddy" Weisgerber [email protected]