On Sat, Aug 26, 2023, 20:18 Tim Hardisty wrote: > This is, I'm sure, more a generic POSIX question than NuttX-specific but I > am still not that familiar with either! > > When I wrote the SAMA5D2 ClassD audio driver I followed the methods > appropriate for using "apb" so it works well with nxplayer (for example). > > But I want to play simple audio tones, from a sine look-up table, and > filling a buffer and enqueuing it seems over the top. > > Is there any reason - from a "correctness" point of view - I couldn't add > a basic file write function to the driver that allows you to simply fwrite > to the opened device and have it dump data that way? > > A simple piece of code that simply writes to the processor audio sample > buffer, word at a time, and polls the "ready" bit works 100% fine but this > is not portable! So if such an interface is not "right" I won't add it :) >
you mean /dev/dsp ? https://man.freebsd.org/cgi/man.cgi?query=sound&apropos=0&manpath=FreeBSD+13.2-RELEASE+and+Ports -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info >