[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cdi-devel] [PATCH] CDI.audio - without "#define TYNDUR"
Hi,
I like the looks of the interface, but the points Kevin have brought
up are, in my opinion, important points to consider.
> + /**
> + * Fuehrt eine Operation aus
> + *
> + * @param device Soundkarte
> + * @param action Auszufuehrende Operation
> + * @param buffer Speicher, in dem die Operation durchgefuehrt werden soll
> + * @param size Groesse des Speichers
> + * @param flags Eventuelle Flags, die die Operation genauer festlegen
> + *
> + * @return 0 bei Erfolg, -1 im Fehlerfall.
> + */
> + int (*act)(struct cdi_audio_device* device, cdi_audio_action_t action,
> + void* buffer, size_t size, int flags);
Out of interest, why not use a read/write/ioctl style interface? Of
course, you probably wouldn't call it read, write, and ioctl, but it
seems to make a little more sense with respect to the concept of audio
where you're writing streams of audio to the device. An ioctl-style
function would probably set up the destination for said streams (along
with other things). I'm interested to hear the rationale here.
Cheers,
Matt