You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Colin Cross 4e39999109
Fix trivial warnings hidden by -isystem
7 years ago
..
include Fix trivial warnings hidden by -isystem 7 years ago
Android.bp Moved headers from include/ to appropriate libs 7 years ago
AudioBufferProviderSource.cpp Remove TimedAudioTrack and associated code 9 years ago
AudioStreamInSource.cpp Update NBAIO to use the new audio HAL abstraction layer 8 years ago
AudioStreamOutSink.cpp Update NBAIO to use the new audio HAL abstraction layer 8 years ago
LibsndfileSink.cpp Move libnbaio out of AudioFlinger 12 years ago
LibsndfileSource.cpp Move libnbaio out of AudioFlinger 12 years ago
MonoPipe.cpp NBAIO: re-implement NBAIO Pipe and MonoPipe using fifo 8 years ago
MonoPipeReader.cpp NBAIO: re-implement NBAIO Pipe and MonoPipe using fifo 8 years ago
NBAIO.cpp Remove TimedAudioTrack and associated code 9 years ago
NBLog.cpp Fix non-trivial warnings hidden by -isystem 7 years ago
Pipe.cpp NBAIO: re-implement NBAIO Pipe and MonoPipe using fifo 8 years ago
PipeReader.cpp Use option to flush the entire buffer on -EOVERFLOW 7 years ago
README.txt Documentation on pipes 12 years ago
SourceAudioBufferProvider.cpp Implement server side playback timestamps with 64 bit accuracy 8 years ago

README.txt

libnbaio (for "Non-Blocking Audio I/O") was originally intended to

be a purely non-blocking API. It has evolved to now include
a few blocking implementations of the interface.

Note: as used here, "short transfer count" means the return value for
read() or write() that indicates the actual number of successfully
transferred frames is less than the requested number of frames.

Pipe
----
supports 1 writer and N readers

no mutexes, so safe to use between SCHED_NORMAL and SCHED_FIFO threads

writes:
non-blocking
never return a short transfer count
overwrite data if not consumed quickly enough

reads:
non-blocking
return a short transfer count if not enough data
will lose data if reader doesn't keep up

MonoPipe
--------
supports 1 writer and 1 reader

no mutexes, so safe to use between SCHED_NORMAL and SCHED_FIFO threads

write are optionally blocking:
if configured to block, then will wait until space available before returning
if configured to not block, then will return a short transfer count
and will never overwrite data

reads:
non-blocking
return a short transfer count if not enough data
never lose data