> But a sound card is a complex thing that can be configured in umpteen different ways; what if the file has a different sample rate than the card is currently running at?
That's what ioctl does: http://www.manpagez.com/man/2/ioctl/
That's what ioctl does: http://www.manpagez.com/man/2/ioctl/
The question is whether this is useful. In particular, once your interface requires ioctl(), you lose the benefit of easy interoperability with UNIX command-line tools.