OSDN Git Service

Replace fifo C API and implementation by C++
authorGlenn Kasten <gkasten@google.com>
Mon, 13 Jun 2016 16:34:57 +0000 (09:34 -0700)
committerGlenn Kasten <gkasten@google.com>
Wed, 15 Jun 2016 18:43:43 +0000 (11:43 -0700)
commit9b4fe47208fbc80e5a56508fc8e7210fa4d888ad
treed799395bb19576929df28ae49c7c3f222ad1fab3
parent27d18b9e805290ca0ead798d9078a7c52fc02440
Replace fifo C API and implementation by C++

Improvements to library:
 - Replace Android atomics by C++ atomics
 - struct -> class
 - init -> constructor, deinit -> destructor
 - Avoid signed arithmetic for security
 - Fix usage in test
 - Add README
 - Improve error recovery by returning a status_t if indices are corrupt
 - Fix bug in diff when assertions enabled
 - Add local indices in preparation for multi-reader and protected pages
 - Add more documentation for internal methods

Improvements to unit test:
 - More error checks
 - Fix double delete of fifoBuffer
 - Support 8-bit wav files
 - Enable assertion checks

Change-Id: I8b391b17084084d8e692765ed210a35aaa0b6747
audio_utils/README.md [new file with mode: 0644]
audio_utils/fifo.cpp
audio_utils/include/audio_utils/fifo.h
audio_utils/tests/Android.mk
audio_utils/tests/fifo_tests.cpp