pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Adding native audio support to ports



On Fri, Jan 26, 2024 at 11:35:11PM +0000, adr wrote:
> On Fri, 26 Jan 2024, nia wrote:
> > The way I have done this in the past has been to write code
> > simply for NetBSD, then, I check what things I am using are
> > NetBSD only.
> > 
> > Usually it is very easy to adapt the code to work on both with
> > #ifdefs, since the NetBSD-specific stuff is mostly optimizations
> > (AUDIO_GETBUFINFO vs. AUDIO_GETINFO) or clarifications of the
> > original API (AUDIO_ENCODING_SLINEAR_LE vs. AUDIO_ENCODING_LINEAR).
> 
> But if other platforms are not going to use it, isn't better to
> just follow the netbsd API and make clear that we are addding native
> audio support for netbsd? Especially for software that supports
> OSS already?.
> 
> I'm working on pcaudiolib, which is used by espeak-ng. I haven't
> fixed a small delay in flushing the deice that I'm experimenting
> with the espeak server of emacspeak. I tested with yasr, is not
> emacspeak fault.  In fact emacspeak is working ok using eflite.
> At least I fixed a silly bug that was preventing the closing of the
> device, so no more choires...
> 
> I'm thinking of changing all references to "sun" to "netbsd", and
> making clear in the code that it's adding support for netbsd (just
> for netbsd). I'm going to do more work with audio and I'd appreciate
> some advice.
> 
> https://github.com/espeak-ng/pcaudiolib/pull/27
> 
> adr

Sounds like you've already made your decision. :-)


Home | Main Index | Thread Index | Old Index