README.txt 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. libnbaio (for "Non-Blocking Audio I/O") was originally intended to
  2. be a purely non-blocking API. It has evolved to now include
  3. a few blocking implementations of the interface.
  4. Note: as used here, "short transfer count" means the return value for
  5. read() or write() that indicates the actual number of successfully
  6. transferred frames is less than the requested number of frames.
  7. Pipe
  8. ----
  9. supports 1 writer and N readers
  10. no mutexes, so safe to use between SCHED_NORMAL and SCHED_FIFO threads
  11. writes:
  12. non-blocking
  13. never return a short transfer count
  14. overwrite data if not consumed quickly enough
  15. reads:
  16. non-blocking
  17. return a short transfer count if not enough data
  18. will lose data if reader doesn't keep up
  19. MonoPipe
  20. --------
  21. supports 1 writer and 1 reader
  22. no mutexes, so safe to use between SCHED_NORMAL and SCHED_FIFO threads
  23. write are optionally blocking:
  24. if configured to block, then will wait until space available before returning
  25. if configured to not block, then will return a short transfer count
  26. and will never overwrite data
  27. reads:
  28. non-blocking
  29. return a short transfer count if not enough data
  30. never lose data